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:all and higher kinded type type parameter #16681

Closed
amumurst opened this issue Jan 13, 2023 · 4 comments
Closed

-Wunused:all and higher kinded type type parameter #16681

amumurst opened this issue Jan 13, 2023 · 4 comments
Assignees
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug

Comments

@amumurst
Copy link

I tried adding the new unused flag (from #16157) to my work codebase and was surprised that it warned about unused import when used with the cats libraries IO type. A minimal reproducer independent of cats is below.

Compiler version

With nightly: 3.3.0-RC1-bin-20230112-be10bc6-NIGHTLY

Minimized code

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

object myPackage:
   case class HKT[A](a: A)

trait Thing[F[_]]
import myPackage.HKT
val x = new Thing[HKT]{}

Output

[warn] ./unused-higher-order-type-param.sc:8:18: unused import
[warn] import myPackage.HKT
[warn]                  ^^^

Expectation

HKT is used as the instance of F in Thing, and hence should not be reported as unused.

@amumurst amumurst added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 13, 2023
@szymon-rd
Copy link
Contributor

Thank you for reporting all these errors! We will promptly address them :)

@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
@amumurst
Copy link
Author

No worries, I am working my way through the app hacking around them for now, happy to help out 👍

@cb372
Copy link
Contributor

cb372 commented Jan 13, 2023

I beat you to this one by a few minutes 😄

This is the same issue as #16680

@Kordyjan Kordyjan added this to the 3.3.0 backports milestone Jan 13, 2023
@dwijnand
Copy link
Member

Duplicate of #16680

@dwijnand dwijnand marked this as a duplicate of #16680 Jan 13, 2023
@dwijnand dwijnand closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2023
@Kordyjan Kordyjan removed this from the 3.3.0 backports milestone Jan 16, 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

No branches or pull requests

5 participants