Closed
Description
Compiler version
3.7.0-RC1, 3.7.0-RC4
Minimized code
Main.scala:
package some.example
package demo
import some.example
object Main {
def generic[T](x: Any): T = null.asInstanceOf[T]
def main(args: Array[String]): Unit = {
generic[example.Util](0)
}
}
Util.scala:
package some.example
class Util
Output
unused import
import some.example
Expectation
The code does not compile without the import.
Note
The code does not make much sense, it can be fixed by using generic[Util](0)
instead of generic[example.Util](0)
, but still, it probably should not create a false warning.