rascal
rascal copied to clipboard
Collection fields do not have defs or uses in TModel
Describe the bug
Collection fields do not have defs or uses in TModel.
To Reproduce
void collectionField() {
println("== Collection fields =");
tm = typeCheck(
"rel[int foo, str bar] r = {};
'set[int] is = r.foo;"
);
// No defs for collection fields
defs = {<d, role> | Define _:<_, _, _, role, d, _> <- tm.defines};
print("Defs with roles: ");
iprintln(defs);
// No uses for collection fields
uses = tm.useDef o defs;
print("Uses: ");
iprintln(uses);
println("======================\n");
}
Expected behavior Defs and uses to exist.