summaryrefslogtreecommitdiff
path: root/test-nsc/files/pos/test4refine.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-10-06 13:14:33 +0000
committerMartin Odersky <odersky@gmail.com>2005-10-06 13:14:33 +0000
commit25a98964b5109aa55b71a8a26886c59903193548 (patch)
tree84b8fa154b5a0a2f36accd43d8d35926f6ba8579 /test-nsc/files/pos/test4refine.scala
parent3b81e0cbac2fe51226472949ecde4d81b0e95412 (diff)
downloadscala-25a98964b5109aa55b71a8a26886c59903193548.tar.gz
scala-25a98964b5109aa55b71a8a26886c59903193548.tar.bz2
scala-25a98964b5109aa55b71a8a26886c59903193548.zip
*** empty log message ***
Diffstat (limited to 'test-nsc/files/pos/test4refine.scala')
-rwxr-xr-xtest-nsc/files/pos/test4refine.scala49
1 files changed, 49 insertions, 0 deletions
diff --git a/test-nsc/files/pos/test4refine.scala b/test-nsc/files/pos/test4refine.scala
new file mode 100755
index 0000000000..6710962934
--- /dev/null
+++ b/test-nsc/files/pos/test4refine.scala
@@ -0,0 +1,49 @@
+trait C {}
+trait D {}
+trait E {}
+
+object test {
+ def c: C = c;
+ def d: D = d;
+ def e: E = e;
+}
+
+import test._;
+
+trait S extends o.I {
+ type Y = D;
+ def bar: E = foo(c,d);
+}
+
+abstract class O() {
+ type X;
+ abstract trait I {
+ type Y;
+ def foo(x: X, y: Y): E = e;
+ }
+ val i:I { type Y = E } = null;
+ val j:I { type Y = X } = null;
+}
+
+object o extends O() {
+ type X = C;
+
+ def main = {
+ val s: S = null;
+ import s._;
+ foo(c,d);
+ o.i.foo(c,e);
+ o.j.foo(c,c);
+ bar
+ }
+}
+
+class Main() {
+ val s: S = null;
+ import s._;
+ foo(c,d);
+ o.i.foo(c,e);
+ o.j.foo(c,c);
+ bar;
+}
+