diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/stable.scala | 2 | ||||
-rw-r--r-- | test/files/pos/infer.scala | 2 | ||||
-rw-r--r-- | test/files/pos/infer2.scala | 2 | ||||
-rw-r--r-- | test/files/pos/patterns3.scala | 4 | ||||
-rw-r--r-- | test/files/run/Course-2002-05.scala | 10 | ||||
-rw-r--r-- | test/files/run/arrays.scala | 4 | ||||
-rw-r--r-- | test/neg/stable.scala | 2 | ||||
-rw-r--r-- | test/pos/infer.scala | 2 | ||||
-rw-r--r-- | test/pos/infer2.scala | 2 | ||||
-rw-r--r-- | test/pos/patterns3.scala | 4 |
10 files changed, 17 insertions, 17 deletions
diff --git a/test/files/neg/stable.scala b/test/files/neg/stable.scala index fc21df732b..ba051cd0e4 100644 --- a/test/files/neg/stable.scala +++ b/test/files/neg/stable.scala @@ -1,6 +1,6 @@ abstract class C { type T; val next: C = this } -module test { +object test { val x: C = new C { type T = int }; var y: C = x; diff --git a/test/files/pos/infer.scala b/test/files/pos/infer.scala index adb586b73e..24871458b3 100644 --- a/test/files/pos/infer.scala +++ b/test/files/pos/infer.scala @@ -1,4 +1,4 @@ -module test { +object test { class List[+a] { def ::[b >: a](x: b): List[b] = new Cons(x, this); } diff --git a/test/files/pos/infer2.scala b/test/files/pos/infer2.scala index 5e93446cdf..66f3d76544 100644 --- a/test/files/pos/infer2.scala +++ b/test/files/pos/infer2.scala @@ -1,4 +1,4 @@ -module test { +object test { def f[a, b <: a](x: b): a = x: a; def g[a >: b, b](x: b): a = x: a; diff --git a/test/files/pos/patterns3.scala b/test/files/pos/patterns3.scala index 6caa834852..001bd8989f 100644 --- a/test/files/pos/patterns3.scala +++ b/test/files/pos/patterns3.scala @@ -1,5 +1,5 @@ -module M { +object M { val Tuple2(Tuple2(x, y), _) = Tuple2(Tuple2(1, 2), 3); -}
\ No newline at end of file +} diff --git a/test/files/run/Course-2002-05.scala b/test/files/run/Course-2002-05.scala index bc5e98592d..2d8a146624 100644 --- a/test/files/run/Course-2002-05.scala +++ b/test/files/run/Course-2002-05.scala @@ -3,7 +3,7 @@ //############################################################################ // $Id$ -module M0 { +object M0 { def partition[a](xs: List[a], pred: a => boolean): Pair[List[a], List[a]] = { if (xs.isEmpty) Pair(List(),List()) @@ -49,7 +49,7 @@ module M0 { //############################################################################ -module M1 { +object M1 { def partition[a](xs: List[a], pred: a => boolean): Pair[List[a], List[a]] = { xs.foldRight[Pair[List[a], List[a]]](Pair(List(), List())) { (x, p) => if (pred (x)) Pair(x :: p._1, p._2) else Pair(p._1, x :: p._2) @@ -89,7 +89,7 @@ module M1 { //############################################################################ -module M2 { +object M2 { def powerset[a] (s : List[a]) : List[List[a]] = { if (s.isEmpty) @@ -113,7 +113,7 @@ module M2 { //############################################################################ -module M3 { +object M3 { type Placement = List[Pair[int,int]]; @@ -156,7 +156,7 @@ module M3 { //############################################################################ -module Test { +object Test { def main(args: Array[String]): unit = { M0.test; M1.test; diff --git a/test/files/run/arrays.scala b/test/files/run/arrays.scala index 605c3c2c4e..8d375166d3 100644 --- a/test/files/run/arrays.scala +++ b/test/files/run/arrays.scala @@ -5,7 +5,7 @@ //############################################################################ -module arrays { +object arrays { type JObject = java.lang.Object; type JSet = java.util.Set; @@ -146,7 +146,7 @@ module arrays { //############################################################################ -module Test { +object Test { def main(args: Array[String]): Unit = { arrays.test; diff --git a/test/neg/stable.scala b/test/neg/stable.scala index fc21df732b..ba051cd0e4 100644 --- a/test/neg/stable.scala +++ b/test/neg/stable.scala @@ -1,6 +1,6 @@ abstract class C { type T; val next: C = this } -module test { +object test { val x: C = new C { type T = int }; var y: C = x; diff --git a/test/pos/infer.scala b/test/pos/infer.scala index adb586b73e..24871458b3 100644 --- a/test/pos/infer.scala +++ b/test/pos/infer.scala @@ -1,4 +1,4 @@ -module test { +object test { class List[+a] { def ::[b >: a](x: b): List[b] = new Cons(x, this); } diff --git a/test/pos/infer2.scala b/test/pos/infer2.scala index 5e93446cdf..66f3d76544 100644 --- a/test/pos/infer2.scala +++ b/test/pos/infer2.scala @@ -1,4 +1,4 @@ -module test { +object test { def f[a, b <: a](x: b): a = x: a; def g[a >: b, b](x: b): a = x: a; diff --git a/test/pos/patterns3.scala b/test/pos/patterns3.scala index 6caa834852..001bd8989f 100644 --- a/test/pos/patterns3.scala +++ b/test/pos/patterns3.scala @@ -1,5 +1,5 @@ -module M { +object M { val Tuple2(Tuple2(x, y), _) = Tuple2(Tuple2(1, 2), 3); -}
\ No newline at end of file +} |