Skip to content

Commit 73f2f52

Browse files
committed
use the TYPE_ONLY_IMPORT context
1 parent 739906b commit 73f2f52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/extractor/src/com/semmle/js/extractor/ASTExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1812,7 +1812,7 @@ public Label visit(ImportDeclaration nd, Context c) {
18121812
public Label visit(ImportSpecifier nd, Context c) {
18131813
Label lbl = super.visit(nd, c);
18141814
visit(nd.getImported(), lbl, 0, IdContext.LABEL);
1815-
visit(nd.getLocal(), lbl, 1, c.idcontext);
1815+
visit(nd.getLocal(), lbl, 1, nd.hasTypeKeyword() ? IdContext.TYPE_ONLY_IMPORT : c.idcontext);
18161816
if (nd.hasTypeKeyword()) {
18171817
trapwriter.addTuple("has_type_keyword", lbl);
18181818
}

0 commit comments

Comments
 (0)