fork download
  1. import Predef.{int2long => _, _}
  2.  
  3. object Main {
  4. def main(args: Array[String]): Unit = {
  5. // The following won't compile:
  6. val x: Long = 4
  7.  
  8. // The following will:
  9. println(4.asInstanceOf[Long])
  10. }
  11. }
Success #stdin #stdout 0.05s 211456KB
stdin
Standard input is empty
stdout
4