Closed jurgenvinju closed 8 months ago
rascal>public void error() {
>>>>>>> set[Declaration] decls = createAstsFromFiles({|home:///Error.java|}, false);
>>>>>>> visit(decls) {
>>>>>>> case \if(cond, _): {
>>>>>>> println("condition at <cond.src>");
>>>>>>> }
>>>>>>> }
>>>>>>>}
void (): function(|prompt:///|(0,208,<1,0>,<8,1>))
rascal>error()
Got NPE for node VIEW="View"
org.rascalmpl.library.lang.java.m3.internal.ASTConverter.resolveType(ASTConverter.java:154)
ok
rascal>public void error2() {
>>>>>>> set[Declaration] decls = createAstsFromFiles({|home:///Error.java|}, false);
>>>>>>>}
void (): function(|prompt:///|(0,104,<1,0>,<3,1>))
rascal>error2()
Got NPE for node VIEW="View"
org.rascalmpl.library.lang.java.m3.internal.ASTConverter.resolveType(ASTConverter.java:154)
ok
rascal>public void error3() {
>>>>>>> set[Declaration] decls = createAstsFromFiles({|home:///Error.java|}, true);
>>>>>>>}
void (): function(|prompt:///|(0,103,<1,0>,<3,1>))
rascal>error3()
ok
Thanks for reporting this @BastiaanHeeren; the code was trying to resolve a type for a field anyway while type resolution was turned off. This explains the NPE.
This report is via via @BastiaanHeeren.
Using JDK 11. and extracting M3 and an AST for this file: