rascal
rascal copied to clipboard
Except uses of constructors have no use/def entry in TModel
Describe the bug
Except uses of constructors have no use/def entry in TModel.
To Reproduce
void exceptConstructor() {
println("= Except constructors=");
tm = typeCheck(
"syntax S
' = foo: \"foo\"
' | bar: \"bar\"
' | baz: S!foo
' ;"
);
defs = {d | Define d:<_, "foo", _, _, _, _> <- tm.defines};
print("Defs of \'foo\': ");
iprintln(defs);
// No uses at !except
print("Uses: ");
iprintln(invert(tm.useDef)[defs.defined]);
println("======================");
}
Expected behavior
A use/def entry at the last occurrence of foo.