Skip to content

Commit 1b1456a

Browse files
committed
JS: Remove a use of TypeName from definitions.qll
1 parent 773d3fa commit 1b1456a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript/ql/lib/definitions.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import javascript
77
import IDEContextual
88
private import Declarations.Declarations
9+
private import semmle.javascript.internal.TypeResolution
910

1011
/**
1112
* Gets the kind of reference that `r` represents.
@@ -126,7 +127,7 @@ private predicate propertyLookup(Expr prop, AstNode write, string kind) {
126127
private predicate typeLookup(AstNode ref, AstNode decl, string kind) {
127128
exists(TypeAccess typeAccess |
128129
ref = typeAccess.getIdentifier() and
129-
decl = typeAccess.getTypeName().getADefinition() and
130+
typeAccess = TypeResolution::trackType(decl) and
130131
kind = "T"
131132
)
132133
}

0 commit comments

Comments
 (0)