Skip to content

Commit 131d77a

Browse files
lauraharkercopybara-github
authored andcommitted
Use isInClosureUnawareSubtree instead of isClosureUnawareCode for AstValidator
This effectively runs AstValidator feature validation more often: now we can run it over code in a /** @closureUnaware @fileoverview */ script, that is not itself in a @closureUnaware function. PiperOrigin-RevId: 845305613
1 parent 37d41b2 commit 131d77a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/google/javascript/jscomp/AstValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2125,7 +2125,7 @@ private void validateMaximumChildCount(Node n, int i) {
21252125
}
21262126

21272127
private void validateFeature(Feature feature, Node n) {
2128-
if (n.isClosureUnawareCode()) {
2128+
if (n.getIsInClosureUnawareSubtree()) {
21292129
// Closure-unaware code is currently hidden from transpilation passes in the compiler, so it
21302130
// might still contain features that should have been transpiled.
21312131
// TODO: b/321233583 - Once JSCompiler can transpile closure-unaware code, remove this

0 commit comments

Comments
 (0)