Closed
Description
Compiler version
3.3.0
Minimized code
➜ dotty git:(test/repl-unused) ./bin/scala -Wunused:all
Welcome to Scala 3.4.0-RC1-bin-SNAPSHOT-git-c90ad6b (20.0.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> import collection.*
1 warning found
-- Warning: ------------------------------------------------------------------------------------------------------------
1 |import collection.*
| ^
| unused import
scala>
Expectation
It's obvious that in REPL, the compiler should not warn on "bare import". (Maybe it's sufficient for compiler not to warn in a compilation unit consisting only of imports.)
It would be nice if REPL never warned on spurious synthetic imports. Not sure if Scala 3 already fixed that issue.
Many build.sbt
have cruft to disable warnings in console
as a workaround.