Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typechecker reports used variable as unused #2014

Open
toinehartman opened this issue Aug 7, 2024 · 0 comments
Open

Typechecker reports used variable as unused #2014

toinehartman opened this issue Aug 7, 2024 · 0 comments
Assignees

Comments

@toinehartman
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants