Skip to content

false unused import warning for scala.compiletime.deferred #22376

Closed
@OlgaDor

Description

@OlgaDor

Compiler version

Scala 3.6.2 with scalacOptions "-Wunused:imports"

Minimized code

import scala.compiletime.deferred

class Context

trait Foo:
  given context: Context = deferred

Output

Scala compiler returns a warning
unused import import scala.compiletime.deferred

The incorrect warning results in misleading highlighting in IntelliJ IDEA when compiler-based highlighting is enabled

Expectation

The compiler should not return an "unused import" warning for scala.compiletime.deferred, as it is clearly used in the code

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:lintingLinting warnings enabled with -W or -Xlintitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions