You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat import_sun.scala
import sun._
$ scalac -deprecation -target:8 import_sun.scala
warning: -target is deprecated: Use -release instead to compile against the correct platform API.
1 warning
$ scalac -release:8 import_sun.scala
import_sun.scala:1: error: not found: object sun
import sun._
^
1 error
Problem
Compiling with the -target flag gives a deprecation warning suggesting to use -release instead. But switching using -release means that the code no longer compiles.
If this is the intended behavior maybe the deprecation warnings/documentation should include more information of the differences between -target and -release.