blob: 120773effa876482434aadd00bde41e59130e9c8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
class Foo(val d: Double) extends AnyVal {
override def toString = s"Foo($d)"
}
object Test {
def main(args: Array[String]): Unit = {
val d: Double = null.asInstanceOf[Double]
println(d)
val f: Foo = null.asInstanceOf[Foo]
println(f)
}
}
|