Skip to content

WUnused false positive in for #17175

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

Closed
szymon-rd opened this issue Mar 29, 2023 · 0 comments · Fixed by #17176
Closed

WUnused false positive in for #17175

szymon-rd opened this issue Mar 29, 2023 · 0 comments · Fixed by #17176
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug
Milestone

Comments

@szymon-rd
Copy link
Contributor

szymon-rd commented Mar 29, 2023

Compiler version

3.3.0-RC2 (not fixed with any PR merged by now [29.03.23])

Minimized code

val continue = true

@main
def main =
  for {
    i <- 1.until(10)
    if continue
  } {
    println(i)
  }

Run with -Wunused:all

Output

-- Warning: Test.scala:18:4 ---------------------------------------------------
18 |    i <- 1.until(10)
   |    ^
   |    unused explicit parameter

Expectation

No warning

@szymon-rd szymon-rd added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label area:linting Linting warnings enabled with -W or -Xlint and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Mar 29, 2023
Kordyjan added a commit that referenced this issue Apr 13, 2023
@Kordyjan Kordyjan added this to the 3.3.1 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants