Renaming specialized
on import results in "unused import" warnings
#20536
Labels
Milestone
specialized
on import results in "unused import" warnings
#20536
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: