From 3307717e4e7dc1faf45accd775e5947db3652cd7 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 18 Mar 2003 11:29:41 +0000 Subject: *** empty log message *** --- test/files/pos/A.scala | 2 +- test/files/pos/List1.scala | 2 +- test/files/pos/clsrefine.scala | 8 ++++---- test/files/pos/michel1.scala | 2 +- test/files/pos/michel2.scala | 4 ++-- test/files/pos/michel4.scala | 2 +- test/files/pos/michel5.scala | 2 +- test/files/pos/stable.scala | 2 +- test/files/pos/test4.scala | 2 +- test/files/pos/test4refine.scala | 4 ++-- test/files/pos/test5refine.scala | 24 ++++++++++++------------ 11 files changed, 27 insertions(+), 27 deletions(-) (limited to 'test/files/pos') diff --git a/test/files/pos/A.scala b/test/files/pos/A.scala index dd8cabaeb7..2f7c958ae2 100644 --- a/test/files/pos/A.scala +++ b/test/files/pos/A.scala @@ -1,4 +1,4 @@ -trait A extends scala.Object with {} +trait A extends scala.Object {} module test { diff --git a/test/files/pos/List1.scala b/test/files/pos/List1.scala index ea25a5c5d5..a6d4e78f8c 100644 --- a/test/files/pos/List1.scala +++ b/test/files/pos/List1.scala @@ -32,7 +32,7 @@ module lists { class IntList() extends List[Int] { def isEmpty: Boolean = False; def head: Int = 1; - def foo: List[Int] with { def isEmpty: Boolean; def head: Int; def tail: List[Int] } = Nil[Int]; + def foo: List[Int] { def isEmpty: Boolean; def head: Int; def tail: List[Int] } = Nil[Int]; def tail0: List[Int] = foo.prepend(1).prepend(1+1); def tail: List[Int] = Nil[Int].prepend(1).prepend(1+1); } diff --git a/test/files/pos/clsrefine.scala b/test/files/pos/clsrefine.scala index cbef0968e0..12f5aa5246 100644 --- a/test/files/pos/clsrefine.scala +++ b/test/files/pos/clsrefine.scala @@ -16,16 +16,16 @@ trait B extends A { } module test { - val b: B with { type Y = Int } = new B { + val b: B { type Y = Int } = new B { type Y = Int; val y1 = 1, y2 = 1; } - val a: A with { type X1 = Int, X2 = Int } = b; - val a1 = new A with { + 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 with { + val b1 = new B { type Y = Any; val y1 = 1, y2 = "hello"; } diff --git a/test/files/pos/michel1.scala b/test/files/pos/michel1.scala index d341abbb87..88ef206ff0 100644 --- a/test/files/pos/michel1.scala +++ b/test/files/pos/michel1.scala @@ -4,6 +4,6 @@ class A[Ta] (a : Ta) { trait C {} -class B[Tb] (b : Tb) extends C with A[Tb] (b) with { +class B[Tb] (b : Tb) extends C with A[Tb] (b) { def g = 2 } \ No newline at end of file diff --git a/test/files/pos/michel2.scala b/test/files/pos/michel2.scala index 8f3f34e1ba..d5b61dda21 100644 --- a/test/files/pos/michel2.scala +++ b/test/files/pos/michel2.scala @@ -1,7 +1,7 @@ -trait A extends Object with { +trait A extends Object { def f : Int = 1 } -trait B extends Object with A with { +trait B extends Object with A { override def f : Int = super.f } \ No newline at end of file diff --git a/test/files/pos/michel4.scala b/test/files/pos/michel4.scala index 2eabe61605..2390be5d26 100644 --- a/test/files/pos/michel4.scala +++ b/test/files/pos/michel4.scala @@ -2,6 +2,6 @@ class A() { val f : Int = 2 } -class B() extends A() with { +class B() extends A() { override val f : Int = super.f } \ No newline at end of file diff --git a/test/files/pos/michel5.scala b/test/files/pos/michel5.scala index 2045737fc4..345ae04d9d 100644 --- a/test/files/pos/michel5.scala +++ b/test/files/pos/michel5.scala @@ -1,5 +1,5 @@ trait A[Ta] { } -class B() extends Object with A[Int] with { +class B() extends Object with A[Int] { val x : Int = 2 } \ No newline at end of file diff --git a/test/files/pos/stable.scala b/test/files/pos/stable.scala index 3bbcad3799..2ae6e2dcec 100644 --- a/test/files/pos/stable.scala +++ b/test/files/pos/stable.scala @@ -4,7 +4,7 @@ trait Base { var z: Int; } -class Sub() extends Base with { +class Sub() extends Base { override val x: Int = 1; override val y: Int = 2; override var z: Int = 3; diff --git a/test/files/pos/test4.scala b/test/files/pos/test4.scala index c71b65a283..0bbb6f97a0 100644 --- a/test/files/pos/test4.scala +++ b/test/files/pos/test4.scala @@ -10,7 +10,7 @@ module test { import test._; -trait S extends o.I[D] with { +trait S extends o.I[D] { def bar: E = foo(c,d); } diff --git a/test/files/pos/test4refine.scala b/test/files/pos/test4refine.scala index 8e3fee70cc..ad68bc891a 100644 --- a/test/files/pos/test4refine.scala +++ b/test/files/pos/test4refine.scala @@ -21,8 +21,8 @@ abstract class O() { type Y; def foo(x: X, y: Y): E = e; } - val i:I with { type Y = E } = null; - val j:I with { type Y = X } = null; + val i:I { type Y = E } = null; + val j:I { type Y = X } = null; } module o extends O() { 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); -- cgit v1.2.3