You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (xml instanceof Blockly.Workspace) {
var swap = xml;
// Closure Compiler complains here because the arguments are reversed.
/** @suppress {checkTypes} */
xml = workspace;
workspace = swap;
console.warn('Deprecated call to Blockly.Xml.domToWorkspace, ' +
'swap the arguments.');
}
Based on the documentation checkTypes is not a suppress annotation that fits outside of the method's JSDOC block, which implicitly means it applies to the entire method only. Also based on the documentation, the above suppression doesn't work at all.
However, I did some testing and that checkTypes suppression annotation is in fact only applying to the following statement only and not the entire method which is what we want there.
I can follow up with the closure compiler team about the documentation, but as far as I can tell this is WAI.
What's the scope of this suppress? https://github.com/google/blockly/blob/master/core/xml.js#L379
The documentation on
@suppress
says it rarely operates on a single-line basis: https://github.com/google/closure-compiler/wiki/@suppress-annotations#other-locationsDoes that mean that this applies for the rest of the lines of the function? If so, should it be in the function's jsdoc instead?
The text was updated successfully, but these errors were encountered: