From f604f30ed02b5b8d326b3b09c2f4f81dd5bc5871 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Wed, 27 Dec 2023 16:37:18 +0100 Subject: [PATCH] fixes #1901 --- .../lang/java/m3/internal/ASTConverter.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java b/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java index 4636e7e31a7..91638d7d228 100644 --- a/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java +++ b/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java @@ -120,14 +120,17 @@ public void postVisit(ASTNode node) { return; } setKeywordParameter("src", getSourceLocation(node)); - ISourceLocation decl = resolveBinding(node); - if (!decl.getScheme().equals("unknown")) { - setKeywordParameter("decl", decl); - } - if (getAdtType() != DATATYPE_RASCAL_AST_STATEMENT_NODE_TYPE) { - IValue type = resolveType(node); - setKeywordParameter("typ", type); + if (collectBindings) { + ISourceLocation decl = resolveBinding(node); + if (!decl.getScheme().equals("unknown")) { + setKeywordParameter("decl", decl); + } + if (getAdtType() != DATATYPE_RASCAL_AST_STATEMENT_NODE_TYPE) { + IValue type = resolveType(node); + + setKeywordParameter("typ", type); + } } }