diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/mixins.check | 6 | ||||
-rw-r--r-- | test/files/run/mixins.scala | 24 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/files/run/mixins.check b/test/files/run/mixins.check index 18a1510925..fe3580e2d2 100644 --- a/test/files/run/mixins.check +++ b/test/files/run/mixins.check @@ -1,2 +1,8 @@ M1::B::f M1::f M2::f M3::f +one +two +A +three +B +C diff --git a/test/files/run/mixins.scala b/test/files/run/mixins.scala index 0b1a43d6b4..fd1b351e71 100644 --- a/test/files/run/mixins.scala +++ b/test/files/run/mixins.scala @@ -49,11 +49,35 @@ object Test2 { } } +// Test 3: mixin evaluation order (bug 120) + +object Test3 { + import System.out.println; + + class A(x: Unit, y: Unit) { + println("A"); + } + + class B(x: Unit) { + println("B"); + } + + class C with A({ println("one"); }, { println("two"); }) + with B({ println("three"); }) { + System.out.println("C"); + } + + def main(args: Array[String]) = { + val c = new C(); + } +} + // Main testing function object Test { def main(args: Array[String]): Unit = { Test1.main(args); Test2.main(args); + Test3.main(args); } } |