summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/run/bugs.check5
-rw-r--r--test/files/run/bugs.scala14
2 files changed, 14 insertions, 5 deletions
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check
index 206d0e9e48..1276cbbcc0 100644
--- a/test/files/run/bugs.check
+++ b/test/files/run/bugs.check
@@ -44,7 +44,8 @@ ok
>>> bug 199
<<< bug 213
-Exception in thread "Thread[main,5,main]" java.lang.ClassCastException
+Cannot cast unit to All
+Cannot cast empty string to AllRef
>>> bug 213
<<< bug 217
@@ -93,5 +94,3 @@ C
a
>>> bug 399
-
-1 error
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");
+ }
()
}
}