summaryrefslogtreecommitdiff
path: root/test/files/run/t5866.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t5866.scala')
-rw-r--r--test/files/run/t5866.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t5866.scala b/test/files/run/t5866.scala
new file mode 100644
index 0000000000..120773effa
--- /dev/null
+++ b/test/files/run/t5866.scala
@@ -0,0 +1,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)
+ }
+}