summaryrefslogtreecommitdiff
path: root/test/files/pos/test5refine.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-03-18 11:29:41 +0000
committerMartin Odersky <odersky@gmail.com>2003-03-18 11:29:41 +0000
commit3307717e4e7dc1faf45accd775e5947db3652cd7 (patch)
treec03b053315c0b62aeb32d1f1a01c638e306905ff /test/files/pos/test5refine.scala
parent31b5dceeb144c7aa99aa153e4184cbb3b45110e0 (diff)
downloadscala-3307717e4e7dc1faf45accd775e5947db3652cd7.tar.gz
scala-3307717e4e7dc1faf45accd775e5947db3652cd7.tar.bz2
scala-3307717e4e7dc1faf45accd775e5947db3652cd7.zip
*** empty log message ***
Diffstat (limited to 'test/files/pos/test5refine.scala')
-rw-r--r--test/files/pos/test5refine.scala24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/files/pos/test5refine.scala b/test/files/pos/test5refine.scala
index a9d7a02bf6..7efbf5a3f1 100644
--- a/test/files/pos/test5refine.scala
+++ b/test/files/pos/test5refine.scala
@@ -4,11 +4,11 @@ module test {
abstract trait F { type If; }
- def f[Jf](h: Jf):F with { type If = Jf } = f[Jf](h);
+ def f[Jf](h: Jf):F { type If = Jf } = f[Jf](h);
abstract trait G { type Ig; }
- def g[Jg](h: Jg):G with { type Ig = Jg } = g[Jg](h);
+ def g[Jg](h: Jg):G { type Ig = Jg } = g[Jg](h);
abstract class M() {
type P;
@@ -23,24 +23,24 @@ module test {
def val_ix: X = val_ix;
}
- val i: I with { type X = G with { type Ig = P } } = null;
+ val i: I { type X = G { type Ig = P } } = null;
// Values with types P and i.X as seen from instances of M
def val_mp: P = val_mp;
- def val_mix: G with { type Ig = P } = g[P](val_mp);
+ def val_mix: G { type Ig = P } = g[P](val_mp);
}
abstract class N() extends M() {
type Q;
- type P = F with { type If = Q };
- val j:J with { type Y = G with { type Ig = Q } } = null;
+ type P = F { type If = Q };
+ val j:J { type Y = G { type Ig = Q } } = null;
abstract class J() extends I() {
type Y;
- type X = G with { type Ig = Y; };
+ type X = G { type Ig = Y; };
// Values with types Y and X as seen from instances of J
def val_jy: Y = val_jy;
- def val_jx: G with { type Ig = Y; } = g[Y](val_jy);
+ def val_jx: G { type Ig = Y; } = g[Y](val_jy);
// Check type P
chk_ip(val_mp);
@@ -49,10 +49,10 @@ module test {
// Values with types Q, X.P, i.X, j.Y and j.X as seen from instances of N
def val_nq: Q = val_nq;
- def val_np: F with { type If = Q } = f[Q](val_nq);
- def val_nix: G with { type Ig = F with { type If = Q } } = g[F with { type If = Q }](val_np);
- def val_njy: G with { type Ig = Q; } = g[Q](val_nq);
- def val_njx: G with { type Ig = G with { type Ig = Q }} = g[G with { type Ig = Q; }](val_njy);
+ def val_np: F { type If = Q } = f[Q](val_nq);
+ def val_nix: G { type Ig = F { type If = Q } } = g[F { type If = Q }](val_np);
+ def val_njy: G { type Ig = Q; } = g[Q](val_nq);
+ def val_njx: G { type Ig = G { type Ig = Q }} = g[G { type Ig = Q; }](val_njy);
// Check type i.P
i.chk_ip(val_mp);