Skip to content

-Wunused: False positive on parameterless enum member #16822

Closed
@kubukoz

Description

@kubukoz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    SpreeSuitable for a future Spreearea:lintingLinting warnings enabled with -W or -Xlintitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions