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

linter.unusedVariables false positive #1633

Closed
digama0 opened this issue Sep 21, 2022 · 1 comment · Fixed by #5337
Closed

linter.unusedVariables false positive #1633

digama0 opened this issue Sep 21, 2022 · 1 comment · Fixed by #5337

Comments

@digama0
Copy link
Collaborator

digama0 commented Sep 21, 2022

example : ∀ (l : List α) n, l.get? n = some a → True
  | _::_, _+1, _ => trivial
  | _::_, 0, rfl => trivial
  --^ unused variable `a` [linter.unusedVariables]
@Kha
Copy link
Member

Kha commented Sep 22, 2022

Somehow the match elaborator is introducing this synthetic name using an original source info. I haven't looked more closely than that yet.

github-merge-queue bot pushed a commit that referenced this issue Sep 13, 2024
Fixes an unused variable false positive on some wildcard patterns

Fixes #1633, fixes #2830
@Kha Kha closed this as completed in #5337 Sep 13, 2024
tobiasgrosser pushed a commit to opencompl/lean4 that referenced this issue Sep 16, 2024
Fixes an unused variable false positive on some wildcard patterns

Fixes leanprover#1633, fixes leanprover#2830
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants