diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/nullAsInstanceOf.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pos/nullAsInstanceOf.scala b/tests/pos/nullAsInstanceOf.scala new file mode 100644 index 000000000..2662df72e --- /dev/null +++ b/tests/pos/nullAsInstanceOf.scala @@ -0,0 +1,11 @@ +object Test { + val b = null.asInstanceOf[Byte] + val c = null.asInstanceOf[Char] + val s = null.asInstanceOf[Short] + val i = null.asInstanceOf[Int] + val l = null.asInstanceOf[Long] + val f = null.asInstanceOf[Float] + val d = null.asInstanceOf[Double] + + val str = null.asInstanceOf[String] +} |