Skip to content

-Wunused: False positive on parameterless enum member #16822

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
kubukoz opened this issue Feb 3, 2023 · 2 comments
Closed

-Wunused: False positive on parameterless enum member #16822

kubukoz opened this issue Feb 3, 2023 · 2 comments
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug Spree Suitable for a future Spree
Milestone

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Feb 3, 2023

Compiler version

3.3.0-RC2

Minimized code

//> using scala "3.3.0-RC2"
//> using option "-Wunused:all"

enum ExampleEnum {
  case Build(context: String)
  case List
}

@main def demo = {
  val x = ExampleEnum.List
  println(x)
}

Output

Compiling project (Scala 3.3.0-RC2, JVM)
[warn] ./demo.scala:6:3: unused explicit parameter
[warn]   case List
[warn]   ^
Compiled project (Scala 3.3.0-RC2, JVM)

Expectation

No warning is reported

@kubukoz kubukoz added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Feb 3, 2023
@bishabosha bishabosha added area:reporting Error reporting including formatting, implicit suggestions, etc and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Feb 3, 2023
@bishabosha bishabosha changed the title Unused warnings: False positive on parameterless enum member -Wunused: False positive on parameterless enum member Feb 3, 2023
@SethTisue SethTisue added the Spree Suitable for a future Spree label Feb 9, 2023
@jchyb jchyb added area:linting Linting warnings enabled with -W or -Xlint and removed area:reporting Error reporting including formatting, implicit suggestions, etc labels Feb 12, 2023
@szymon-rd
Copy link
Contributor

@PaulCoral Did you have a chance to look at this?

PaulCoral added a commit to PaulCoral/dotty that referenced this issue Feb 15, 2023
- Ignore synthetic local private
- Update test suit
@PaulCoral PaulCoral mentioned this issue Feb 15, 2023
@PaulCoral
Copy link
Contributor

PaulCoral commented Feb 15, 2023

@PaulCoral Did you have a chance to look at this?

@szymon-rd I couldn't work on the linter during past two weeks. I will try to fix the remaining warn-unused bugs.

szymon-rd added a commit that referenced this issue Feb 16, 2023
Kordyjan pushed a commit to dotty-staging/dotty that referenced this issue Apr 14, 2023
- Ignore synthetic local private
- Update test suit
Kordyjan pushed a commit that referenced this issue Apr 14, 2023
- Ignore synthetic local private
- Update test suit
Kordyjan added a commit that referenced this issue Apr 17, 2023
@Kordyjan Kordyjan added this to the 3.3.0 milestone Aug 2, 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 Spree Suitable for a future Spree
Projects
None yet
Development

No branches or pull requests

7 participants