From 7bfe816d3d8112828ba2ef80625e665255532621 Mon Sep 17 00:00:00 2001 From: paltherr Date: Thu, 30 Oct 2003 12:55:59 +0000 Subject: - Added bug 213 --- test/files/run/bugs.check | 3 +++ test/files/run/bugs.scala | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) 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 @@ -155,6 +155,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 @@ -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(); -- cgit v1.2.3