rascal
rascal copied to clipboard
Typechecker reports used variable as unused
Describe the bug
The typechecker reports a 'unused pattern variable' warning on a used pattern variable
To Reproduce Unfortunately, I have not been able to reproduce this in a smaller example.
data D
= a(str s, D d)
| b()
;
void f() {
set[D] ds1 = {};
set[D] ds2 = {d
| D d: a(_, child: b()) <- ds1
, s2: "bar" := "foo" // Warning: "Unused patternvariable `s2`"
, /s2 := child
};
}
Expected behavior
No unused warning on s2.