summaryrefslogtreecommitdiff
path: root/test/files/run/t4148.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t4148.scala')
-rw-r--r--test/files/run/t4148.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t4148.scala b/test/files/run/t4148.scala
new file mode 100644
index 0000000000..a7d181268d
--- /dev/null
+++ b/test/files/run/t4148.scala
@@ -0,0 +1,9 @@
+object Test {
+ val x1 = try { "aaa".asInstanceOf[Int] } catch { case _ => "cce1" }
+ val x2 = try { (5: Any).asInstanceOf[Int] } catch { case _ => "cce2" }
+ val x3 = try { (new java.lang.Short(100.toShort).asInstanceOf[Int]) } catch { case _ => "cce3" }
+
+ def main(args: Array[String]): Unit = {
+ List(x1, x2, x3) foreach println
+ }
+}