diff options
author | paltherr <paltherr@epfl.ch> | 2003-10-30 12:55:59 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-10-30 12:55:59 +0000 |
commit | 7bfe816d3d8112828ba2ef80625e665255532621 (patch) | |
tree | 01c2a2f40d25e49267cdd7097820a0d8ff3e6221 /test | |
parent | fb814bd99236d100b74978cb357ab42ffb2c79a8 (diff) | |
download | scala-7bfe816d3d8112828ba2ef80625e665255532621.tar.gz scala-7bfe816d3d8112828ba2ef80625e665255532621.tar.bz2 scala-7bfe816d3d8112828ba2ef80625e665255532621.zip |
- Added bug 213
Diffstat (limited to 'test')
-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(); |