diff options
author | paltherr <paltherr@epfl.ch> | 2003-09-12 21:24:09 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-09-12 21:24:09 +0000 |
commit | 01d4668fc81fbbb245d145086ceea0755848a383 (patch) | |
tree | 89e8273d8eb455e3e81369102f6e3e80382350c4 /test/files/jvm | |
parent | 6e784092689e55e768aee020ba6269c38f2b0188 (diff) | |
download | scala-01d4668fc81fbbb245d145086ceea0755848a383.tar.gz scala-01d4668fc81fbbb245d145086ceea0755848a383.tar.bz2 scala-01d4668fc81fbbb245d145086ceea0755848a383.zip |
- Added test file for bug 142
Diffstat (limited to 'test/files/jvm')
-rw-r--r-- | test/files/jvm/bug142.check | 8 | ||||
-rw-r--r-- | test/files/jvm/bug142.scala | 39 |
2 files changed, 47 insertions, 0 deletions
diff --git a/test/files/jvm/bug142.check b/test/files/jvm/bug142.check new file mode 100644 index 0000000000..2ecb5b2188 --- /dev/null +++ b/test/files/jvm/bug142.check @@ -0,0 +1,8 @@ +ok +ok +ok +ok +ok +ok +ok +ok diff --git a/test/files/jvm/bug142.scala b/test/files/jvm/bug142.scala new file mode 100644 index 0000000000..9985ec83bf --- /dev/null +++ b/test/files/jvm/bug142.scala @@ -0,0 +1,39 @@ +//############################################################################ +// Bug 142 +//############################################################################ +// $Id$ + +import System.out.println; + +abstract class Foo1 { class Inner; def foo: Inner; foo; } +abstract class Foo2 { class Inner; def foo: Inner = {println("ok"); null}; } +abstract class Foo3 { type Inner; def foo: Inner; foo; } +abstract class Foo4 { type Inner; def foo: Inner = {println("ok"); null.asInstanceOf[Inner]}; } + +abstract class Bar1 { type Inner; def foo: Inner = {println("ok"); null.asInstanceOf[Inner]}; } +abstract class Bar2 { type Inner; def foo: Inner; foo; } +abstract class Bar3 { class Inner; def foo: Inner = {println("ok"); null}; } +abstract class Bar4 { class Inner; def foo: Inner; foo; } + +object Test1 extends Foo1 with Bar1 {def main(args:Array[String]):Unit=();} +object Test2 extends Foo2 with Bar2 {def main(args:Array[String]):Unit=();} +object Test3 extends Foo3 with Bar3 {def main(args:Array[String]):Unit=();} +object Test4 extends Foo4 with Bar4 {def main(args:Array[String]):Unit=();} +object Test5 with Foo1 with Bar1 {def main(args:Array[String]):Unit=();} +object Test6 with Foo2 with Bar2 {def main(args:Array[String]):Unit=();} +object Test7 with Foo3 with Bar3 {def main(args:Array[String]):Unit=();} +object Test8 with Foo4 with Bar4 {def main(args:Array[String]):Unit=();} + +object Test { + def main(args:Array[String]): Unit = { + Test1; + Test2; + Test3; + Test4; + Test5; + Test6; + Test7; + Test8; + () + } +} |