summaryrefslogtreecommitdiff
path: root/test/files/run/bugs.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/bugs.scala')
-rw-r--r--test/files/run/bugs.scala14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala
index 90711e7ad2..8d611dae6a 100644
--- a/test/files/run/bugs.scala
+++ b/test/files/run/bugs.scala
@@ -221,8 +221,18 @@ class Bug213Bar extends Bug213Foo {
object Bug213Test {
def main(args: Array[String]): Unit = {
val foo: Bug213Foo = new Bug213Bar;
- foo.testAll;
- foo.testAllRef;
+ try {
+ foo.testAll;
+ } catch {
+ case e: java.lang.ClassCastException =>
+ Console.println("Cannot cast unit to All");
+ }
+ try {
+ foo.testAllRef;
+ } catch {
+ case e: java.lang.ClassCastException =>
+ Console.println("Cannot cast empty string to AllRef");
+ }
()
}
}