summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-06 15:27:49 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-06 15:27:49 +0000
commitd49b034739b5071bfbc37c2c010a83d12d7405e4 (patch)
tree69010a8cfc9bb560798fcc20889abe41992b46f9 /test
parent0e0aa61d204a75bf3c65b493edbfc469a99dee91 (diff)
downloadscala-d49b034739b5071bfbc37c2c010a83d12d7405e4.tar.gz
scala-d49b034739b5071bfbc37c2c010a83d12d7405e4.tar.bz2
scala-d49b034739b5071bfbc37c2c010a83d12d7405e4.zip
- Added bug 176
Diffstat (limited to 'test')
-rw-r--r--test/files/run/bugs.check4
-rw-r--r--test/files/run/bugs.scala29
2 files changed, 33 insertions, 0 deletions
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check
index c0a07c9b4c..2c74941b17 100644
--- a/test/files/run/bugs.check
+++ b/test/files/run/bugs.check
@@ -25,3 +25,7 @@ ok
<<< bug 174
>>> bug 174
+<<< bug 176
+1
+>>> bug 176
+
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala
index 6454e12c0f..b84d9827fb 100644
--- a/test/files/run/bugs.scala
+++ b/test/files/run/bugs.scala
@@ -127,6 +127,34 @@ object Bug174Test {
}
}
+
+//############################################################################
+// Bug 176
+
+trait Bug176A {
+ type T;
+ def foo(x: T): Int;
+ def bar: T;
+ def test = foo(bar);
+}
+trait Bug176B {
+ type S <: Object;
+ type T = S;
+ def foo(x: S): Int;
+ def bar: S;
+}
+class Bug176C with Bug176A with Bug176B {
+ class S;
+ def foo(x: S) = 1;
+ def bar = new S;
+}
+object Bug176Test {
+ def main(args: Array[String]): Unit = {
+ val x: Bug176A = new Bug176C;
+ System.out.println(x.test);
+ }
+}
+
//############################################################################
// Main
@@ -157,6 +185,7 @@ object Test {
test(167, Bug167Test.main(args));
test(168, Bug168Test.main(args));
test(174, Bug174Test.main(args));
+ test(176, Bug176Test.main(args));
if (errors > 0) {
System.out.println();