diff options
author | Martin Odersky <odersky@gmail.com> | 2004-01-15 12:14:03 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2004-01-15 12:14:03 +0000 |
commit | de408cadfb612d04e9adfe049a2bdf9f71da5bd5 (patch) | |
tree | d2b471cdfd6e97b00e79b1eb6d6ff19faae073a8 /test/pos/clsrefine.scala | |
parent | 0362d6e25548f8f5c644af8eca34c6c7de47f246 (diff) | |
download | scala-de408cadfb612d04e9adfe049a2bdf9f71da5bd5.tar.gz scala-de408cadfb612d04e9adfe049a2bdf9f71da5bd5.tar.bz2 scala-de408cadfb612d04e9adfe049a2bdf9f71da5bd5.zip |
*** empty log message ***
Diffstat (limited to 'test/pos/clsrefine.scala')
-rw-r--r-- | test/pos/clsrefine.scala | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/pos/clsrefine.scala b/test/pos/clsrefine.scala new file mode 100644 index 0000000000..56db9d4c13 --- /dev/null +++ b/test/pos/clsrefine.scala @@ -0,0 +1,33 @@ +import scala._; + +package scalac.util { + +trait A { + type X1, X2; + val x1: X1, x2: X2; +} +trait B extends A { + type Y; + val y1: Y, y2: Y; + type X1 = Y, X2 = Y; + val x1 = y1, 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 = 1, y2 = 1; + } + val a: A { type X1 = Int, X2 = Int } = b; + val a1 = new A { + type X1 = Int, X2 = String; + val x1 = 1, x2 = "hello" + } + val b1 = new B { + type Y = Any; + val y1 = 1, y2 = "hello"; + } +} +}
\ No newline at end of file |