use the TYPE_ONLY_IMPORT context

This commit is contained in:
Erik Krogh Kristensen
2021-12-01 14:54:16 +01:00
parent 739906b60c
commit 73f2f52ed8

View File

@@ -1812,7 +1812,7 @@ public class ASTExtractor {
public Label visit(ImportSpecifier nd, Context c) {
Label lbl = super.visit(nd, c);
visit(nd.getImported(), lbl, 0, IdContext.LABEL);
visit(nd.getLocal(), lbl, 1, c.idcontext);
visit(nd.getLocal(), lbl, 1, nd.hasTypeKeyword() ? IdContext.TYPE_ONLY_IMPORT : c.idcontext);
if (nd.hasTypeKeyword()) {
trapwriter.addTuple("has_type_keyword", lbl);
}