-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Renaming specialized
on import results in "unused import" warnings
#20536
Comments
The Scala 3 check was intentionally skipping the type parameter, but inadvertently skipping the annotation. The rename was not germane. Worth adding that Scala 2:
Scala 3
|
Ah, sorry, I overworked it a little. In Cats it is a generic |
I didn't intend to rub it in. My point was going to be that scala 2 will lint that, but then I looked and scala 3 does it now too. I'll have to find some other clever thing to point out. |
Compiler version
v3.3.3, v3.4.2
Minimized code
Script that I used for testing:
set -v scala-cli clean ImportUnusedSpecializedRename.scala scala-cli compile --server=false -j 17 -S 2.12.19 -Xlint:unused ImportUnusedSpecializedRename.scala scala-cli compile --server=false -j 17 -S 2.13.14 -Wunused ImportUnusedSpecializedRename.scala scala-cli compile --server=false -j 17 -S 3.3.3 -Wunused:imports ImportUnusedSpecializedRename.scala scala-cli compile --server=false -j 17 -S 3.4.2 -Wunused:imports ImportUnusedSpecializedRename.scala
Output
Expectation
Scala3 should compile the above example without the "unused import" warnings.
As long as Scala2 compilers can do.
Additional Information
This issues causes a lot of extra warnings added up while compiling Cats for Scala3.
Historically, Cats uses
import scala.{specialized => sp}
in a bunch of files across the repository.The text was updated successfully, but these errors were encountered: