Skip to content
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

False positive unused import #19252

Closed
KuceraMartin opened this issue Dec 12, 2023 · 0 comments · Fixed by #20894
Closed

False positive unused import #19252

KuceraMartin opened this issue Dec 12, 2023 · 0 comments · Fixed by #20894
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug

Comments

@KuceraMartin
Copy link
Contributor

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.

@KuceraMartin KuceraMartin added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 12, 2023
@szymon-rd szymon-rd self-assigned this Dec 17, 2023
@szymon-rd szymon-rd added area:linting Linting warnings enabled with -W or -Xlint and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 17, 2023
@sjrd sjrd closed this as completed in 9cb97ec Jan 28, 2025
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
Projects
None yet
2 participants