matthiasblaesing commented on code in PR #8434: URL: https://github.com/apache/netbeans/pull/8434#discussion_r2052893928
########## webcommon/javascript2.editor/src/org/netbeans/modules/javascript2/editor/JsSemanticAnalyzer.java: ########## @@ -402,11 +402,11 @@ public boolean enterObjectNode(ObjectNode objectNode) { @Override public boolean enterVarNode(VarNode varNode) { - if (varNode.isLet()) { + if (varNode.isLet() || varNode.isConst()) { Review Comment: Because the usage of `let` or `const` implies block scope, while the reverse might not be true (in a hypothetical JS extension) in the future. It is true that at this point in time `varNode.isLet() || varNode.isConst()` and `varNode.isBlockScoped()` result in identical behavior, but it is not guaranteed to stay that way. In the concrete case, the analyser explicitly handles the two keywords `let` and `const` in `let` or `const` declarations nothing more. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists