summaryrefslogtreecommitdiff
path: root/test-nsc/files/pos/clsrefine.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/clsrefine.scala
parent3b81e0cbac2fe51226472949ecde4d81b0e95412 (diff)
downloadscala-25a98964b5109aa55b71a8a26886c59903193548.tar.gz
scala-25a98964b5109aa55b71a8a26886c59903193548.tar.bz2
scala-25a98964b5109aa55b71a8a26886c59903193548.zip
*** empty log message ***
Diffstat (limited to 'test-nsc/files/pos/clsrefine.scala')
-rwxr-xr-xtest-nsc/files/pos/clsrefine.scala40
1 files changed, 40 insertions, 0 deletions
diff --git a/test-nsc/files/pos/clsrefine.scala b/test-nsc/files/pos/clsrefine.scala
new file mode 100755
index 0000000000..d63923b5e6
--- /dev/null
+++ b/test-nsc/files/pos/clsrefine.scala
@@ -0,0 +1,40 @@
+import scala._;
+
+package scalac.util {
+
+trait A {
+ type X1;
+ type X2;
+ val x1: X1;
+ val x2: X2;
+}
+trait B extends A {
+ type Y;
+ val y1, y2: Y;
+ type X1 = Y;
+ type X2 = Y;
+ val x1 = y1;
+ val x2 = y2;
+ def f(x: Y, xs: B): Unit = {}
+ def g() = f(y1, this);
+}
+
+object test {
+ val b: B { type Y = Int } = new B {
+ type Y = Int;
+ val y1, y2 = 1;
+ }
+ val a: A { type X1 = Int; type X2 = Int } = b;
+ val a1 = new A {
+ type X1 = Int;
+ type X2 = String;
+ val x1 = 1;
+ val x2 = "hello"
+ }
+ val b1 = new B {
+ type Y = Any;
+ val y1 = 1;
+ val y2 = "hello";
+ }
+}
+} \ No newline at end of file