16
16
17
17
package com .google .javascript .jscomp ;
18
18
19
- import static com .google .common .base .Preconditions .checkNotNull ;
20
-
21
19
import com .google .common .collect .ImmutableMap ;
22
20
import com .google .common .collect .Sets ;
23
21
import com .google .javascript .jscomp .NodeTraversal .AbstractModuleCallback ;
@@ -84,7 +82,7 @@ public boolean shouldTraverse(
84
82
}
85
83
86
84
// Traverse nodes in preorder to collect `@template` parameter names before their use.
87
- visitNode (t , n , checkNotNull ( currentModule ) );
85
+ visitNode (t , n , currentModule );
88
86
return true ;
89
87
}
90
88
@@ -102,14 +100,13 @@ private void visitNode(NodeTraversal t, Node n, ModuleMetadata currentModule) {
102
100
if (info != null ) {
103
101
visitJsDocInfo (t , currentModule , info );
104
102
}
105
- if (n . isQualifiedName () && ! n . getParent (). isGetProp ()) {
103
+ if (! n . getParent (). isGetProp () && n . isQualifiedName ()) {
106
104
QualifiedName qualifiedName = n .getQualifiedNameObject ();
107
105
String root = qualifiedName .getRoot ();
108
106
if (root .equals ("this" ) || root .equals ("super" )) {
109
107
return ;
110
108
}
111
- visitQualifiedName (
112
- t , n , currentModule , n .getQualifiedNameObject (), /* isStrongReference= */ true );
109
+ visitQualifiedName (t , n , currentModule , qualifiedName , /* isStrongReference= */ true );
113
110
}
114
111
}
115
112
0 commit comments