Skip to content

False positive unused import #19252

Closed
@KuceraMartin

Description

@KuceraMartin

Compiler version

3.3.0, 3.3.1, 3.4.0-RC1-bin-20231211-feed938-NIGHTLY

Minimized code

object Deps:
  trait D1
  object D2
end Deps

object Bug:
  import Deps.D1

  class Cl(d1: D1):
    import Deps.*
    def f = (d1, D2)
end Bug

Output

if compiled with -Wunused:imports:

[warn] ./bug.scala:7:15
[warn] unused import
[warn]   import Deps.D1
[warn]               ^^

Expectation

Shouldn't emit any warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: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