diff options
-rw-r--r-- | test/files/run/bugs.check | 3 | ||||
-rw-r--r-- | test/files/run/bugs.scala | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check index 2c74941b17..1a77868946 100644 --- a/test/files/run/bugs.check +++ b/test/files/run/bugs.check @@ -29,3 +29,6 @@ ok 1 >>> bug 176 +<<< bug 213 +>>> bug 213 + 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(); |