Skip to content

False positive unused for class only used by calling companion apply #24457

@eejbyfeldt

Description

@eejbyfeldt

Compiler version

3.8.0-RC1, 3.8.1-RC1-bin-20251117-5ccea40-NIGHTLY

Works correctly in 3.7.4.

Minimized code

//> using scala 3.8.0-RC1
//> using options -Wunused:all

object test {
  private case class Impl()
  inline def makeImpl(): Any = Impl()
}

Output

[warn] ./unused_class_inline.scala:5:22
[warn] unused private member
[warn]   private case class Impl()
[warn]  

Expectation

No warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:lintingLinting warnings enabled with -W or -Xlintitype:bugregressionThis worked in a previous version but doesn't anymore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions