summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2005-02-18 18:40:21 +0000
committerpaltherr <paltherr@epfl.ch>2005-02-18 18:40:21 +0000
commitded727e045d47103ccd9a576d2e15bb1ca2695a2 (patch)
tree59ccebf7c1fe94d9c9413d0326ca56d26bacc21c /test
parentee4c236bcf98fbb10d73933ddb1c005412eaa947 (diff)
downloadscala-ded727e045d47103ccd9a576d2e15bb1ca2695a2.tar.gz
scala-ded727e045d47103ccd9a576d2e15bb1ca2695a2.tar.bz2
scala-ded727e045d47103ccd9a576d2e15bb1ca2695a2.zip
- Fixed and added bug 399
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/compile.scala17
-rw-r--r--test/files/run/bugs.check4
-rw-r--r--test/files/run/bugs.scala18
3 files changed, 39 insertions, 0 deletions
diff --git a/test/files/pos/compile.scala b/test/files/pos/compile.scala
index b926456753..3979c9737a 100644
--- a/test/files/pos/compile.scala
+++ b/test/files/pos/compile.scala
@@ -130,3 +130,20 @@ class Test2_3() {
}
//############################################################################
+// Test 3 - Super Calls with Mixins
+
+class Test3Foo;
+
+trait Test3A[T] {
+ def fun: T = fun;
+}
+
+class Test3B with Test3A[Test3Foo];
+
+trait Test3M extends Test3A[Test3Foo] {
+ override def fun: Test3Foo = super.fun;
+}
+
+class Test3C extends Test3B with Test3M;
+
+//############################################################################
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check
index 7dd6a42bfb..d61bdf9afc 100644
--- a/test/files/run/bugs.check
+++ b/test/files/run/bugs.check
@@ -91,3 +91,7 @@ B
C
>>> bug 396
+<<< bug 399
+a
+>>> bug 399
+
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala
index 494ed35b53..d8b21b7b59 100644
--- a/test/files/run/bugs.scala
+++ b/test/files/run/bugs.scala
@@ -432,6 +432,23 @@ object Bug396Test extends Bug396B with Bug396C with Application {
}
//############################################################################
+// Bug 399
+
+object Bug399Test {
+ def f(x: String): String = {
+ trait C { def f: String = x; }
+ class D with C;
+ class F with C;
+ class G extends D with F;
+ (new G).f
+ }
+
+ def main(args: Array[String]): Unit = {
+ System.out.println(f("a"));
+ }
+}
+
+//############################################################################
// Main
object Test {
@@ -478,6 +495,7 @@ object Test {
test(316, Bug316Test.main(args));
test(328, Bug328Test.main(args));
test(396, Bug396Test.main(args));
+ test(399, Bug399Test.main(args));
if (errors > 0) {
System.out.println();