summaryrefslogtreecommitdiff
path: root/test/files/run/bugs.scala
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-30 12:55:59 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-30 12:55:59 +0000
commit7bfe816d3d8112828ba2ef80625e665255532621 (patch)
tree01c2a2f40d25e49267cdd7097820a0d8ff3e6221 /test/files/run/bugs.scala
parentfb814bd99236d100b74978cb357ab42ffb2c79a8 (diff)
downloadscala-7bfe816d3d8112828ba2ef80625e665255532621.tar.gz
scala-7bfe816d3d8112828ba2ef80625e665255532621.tar.bz2
scala-7bfe816d3d8112828ba2ef80625e665255532621.zip
- Added bug 213
Diffstat (limited to 'test/files/run/bugs.scala')
-rw-r--r--test/files/run/bugs.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala
index b84d9827fb..8e9507a2a6 100644
--- a/test/files/run/bugs.scala
+++ b/test/files/run/bugs.scala
@@ -156,6 +156,28 @@ object Bug176Test {
}
//############################################################################
+// Bug 213
+
+trait Bug213Foo {
+ def testAll: Unit;
+ def testAllRef: String;
+}
+
+class Bug213Bar extends Bug213Foo {
+ def testAll = (().asInstanceOf[All] : All);
+ def testAllRef = ("".asInstanceOf[AllRef] : AllRef);
+}
+
+object Bug213Test {
+ def main(args: Array[String]): Unit = {
+ val foo: Bug213Foo = new Bug213Bar;
+ foo.testAll;
+ foo.testAllRef;
+ ()
+ }
+}
+
+//############################################################################
// Main
object Test {
@@ -186,6 +208,7 @@ object Test {
test(168, Bug168Test.main(args));
test(174, Bug174Test.main(args));
test(176, Bug176Test.main(args));
+ test(213, Bug213Test.main(args));
if (errors > 0) {
System.out.println();