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

-Wunused:imports false positive when import is used in a type argument #16680

Closed
cb372 opened this issue Jan 13, 2023 · 0 comments · Fixed by #16689
Closed

-Wunused:imports false positive when import is used in a type argument #16680

cb372 opened this issue Jan 13, 2023 · 0 comments · Fixed by #16689
Assignees
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug
Milestone

Comments

@cb372
Copy link
Contributor

cb372 commented Jan 13, 2023

Compiler version

3.3.0-RC1-bin-20230112-be10bc6-NIGHTLY

Minimized code

//> using scala "3.3.0-RC1-bin-20230112-be10bc6-NIGHTLY"
//> using option "-Wunused:imports"

package foo:
  class IO[A]

package bar:
  import foo.IO

  def f[F[_]]: String = "hello"
  def go = f[IO]

Output

$ scala-cli compile unused-import.scala
[warn] ./unused-import.scala:8:14: unused import
[warn]   import foo.IO
[warn]              ^^

Expectation

No warning

@cb372 cb372 added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 13, 2023
@szymon-rd szymon-rd self-assigned this Jan 13, 2023
@szymon-rd szymon-rd added area:reporting Error reporting including formatting, implicit suggestions, etc and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 13, 2023
@Kordyjan Kordyjan added this to the 3.3.0 backports milestone Jan 13, 2023
PaulCoral added a commit to PaulCoral/dotty that referenced this issue Jan 13, 2023
- Register their type
- Fix scala#16680
- Update test suit
PaulCoral added a commit to PaulCoral/dotty that referenced this issue Jan 13, 2023
- Register their type
- Fix scala#16680
- Update test suit
szymon-rd added a commit that referenced this issue Jan 16, 2023
- Register their type instead
- Fix #16680
- Update test suit
@szymon-rd
little-inferno pushed a commit to little-inferno/dotty that referenced this issue Jan 25, 2023
- Register their type
- Fix scala#16680
- Update test suit
@Kordyjan Kordyjan modified the milestones: 3.3.0 backports, 3.3.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants