diff options
author | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-08-12 14:39:55 +0000 |
---|---|---|
committer | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-08-12 14:39:55 +0000 |
commit | d27e89c0bc0ee1775eae09238319c44e85a44d5d (patch) | |
tree | e2f81270d39cadcbe30949757cddf4e7af8ddb42 /test/files/neg | |
parent | fe4591ba0c8d727ee563ba4752a86db5d220ec76 (diff) | |
download | scala-d27e89c0bc0ee1775eae09238319c44e85a44d5d.tar.gz scala-d27e89c0bc0ee1775eae09238319c44e85a44d5d.tar.bz2 scala-d27e89c0bc0ee1775eae09238319c44e85a44d5d.zip |
Fixing more deprecation warnings.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug1112.check | 2 | ||||
-rw-r--r-- | test/files/neg/bug1112.scala | 6 | ||||
-rw-r--r-- | test/files/neg/bug414.scala | 4 | ||||
-rw-r--r-- | test/files/neg/constrs.check | 4 | ||||
-rw-r--r-- | test/files/neg/constrs.scala | 6 | ||||
-rw-r--r-- | test/files/neg/faculty.check | 2 | ||||
-rw-r--r-- | test/files/neg/faculty.scala | 2 | ||||
-rw-r--r-- | test/files/neg/imp2.scala | 2 | ||||
-rw-r--r-- | test/files/neg/patternalts.scala | 2 | ||||
-rw-r--r-- | test/files/neg/viewtest.scala | 12 |
10 files changed, 21 insertions, 21 deletions
diff --git a/test/files/neg/bug1112.check b/test/files/neg/bug1112.check index 9aedff2de9..779aa90bab 100644 --- a/test/files/neg/bug1112.check +++ b/test/files/neg/bug1112.check @@ -1,4 +1,4 @@ -bug1112.scala:12: error: wrong number of arguments for method call: (int)(=> () => unit)unit +bug1112.scala:12: error: wrong number of arguments for method call: (Int)(=> () => Unit)Unit call(0,() => System.out.println("here we are")) ^ one error found diff --git a/test/files/neg/bug1112.scala b/test/files/neg/bug1112.scala index 3e108e39af..1a88629faf 100644 --- a/test/files/neg/bug1112.scala +++ b/test/files/neg/bug1112.scala @@ -2,13 +2,13 @@ // (due to isFunctionType normalizing Type1 to a function type, // but then the code that used that test not using the normalized type for further operations) class Test { - type Type1 = () => unit + type Type1 = () => Unit - def call(p: int)(f: => Type1) = { + def call(p: Int)(f: => Type1) = { f() } def run = { call(0,() => System.out.println("here we are")) } -}
\ No newline at end of file +} diff --git a/test/files/neg/bug414.scala b/test/files/neg/bug414.scala index 3dff7f7b36..7983fe88b9 100644 --- a/test/files/neg/bug414.scala +++ b/test/files/neg/bug414.scala @@ -1,7 +1,7 @@ case class Empty[a] extends IntMap[a]; -case class Node[a](left: IntMap[a], keyVal: Pair[int, a], right: IntMap[a]) extends IntMap[a]; +case class Node[a](left: IntMap[a], keyVal: Pair[Int, a], right: IntMap[a]) extends IntMap[a]; abstract class IntMap[a] { - def lookup(key: int): a = this match { + def lookup(key: Int): a = this match { case Empty => error("clef inexistante") case _ => diff --git a/test/files/neg/constrs.check b/test/files/neg/constrs.check index 606565d42e..3524709785 100644 --- a/test/files/neg/constrs.check +++ b/test/files/neg/constrs.check @@ -1,8 +1,8 @@ constrs.scala:6: error: type T is not a member of object test - def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); Console.println(x) } + def this(y: Int)(z: Int)(t: this.T) = { this(this.u + y + z); Console.println(x) } ^ constrs.scala:6: error: value u is not a member of object test - def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); Console.println(x) } + def this(y: Int)(z: Int)(t: this.T) = { this(this.u + y + z); Console.println(x) } ^ constrs.scala:10: error: called constructor's definition must precede calling constructor's definition def this() = this("abc") diff --git a/test/files/neg/constrs.scala b/test/files/neg/constrs.scala index e425a25120..969f593a2d 100644 --- a/test/files/neg/constrs.scala +++ b/test/files/neg/constrs.scala @@ -1,12 +1,12 @@ object test { - abstract class Test(x: int) { + abstract class Test(x: Int) { type T; val u = x; - def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); Console.println(x) } + def this(y: Int)(z: Int)(t: this.T) = { this(this.u + y + z); Console.println(x) } } - class Foo(x: int) { + class Foo(x: Int) { def this() = this("abc") def this(x: String) = this(1) def this(x: boolean) = this(x) diff --git a/test/files/neg/faculty.check b/test/files/neg/faculty.check index 029ef16e59..b1d1d4c9f8 100644 --- a/test/files/neg/faculty.check +++ b/test/files/neg/faculty.check @@ -1,4 +1,4 @@ faculty.scala:3: error: recursive method faculty needs result type - def faculty(x: int) = if (x == 0) 1 else x * faculty(x - 1) + def faculty(x: Int) = if (x == 0) 1 else x * faculty(x - 1) ^ one error found diff --git a/test/files/neg/faculty.scala b/test/files/neg/faculty.scala index 464033ef30..1f137a48fa 100644 --- a/test/files/neg/faculty.scala +++ b/test/files/neg/faculty.scala @@ -1,5 +1,5 @@ object Test { - def faculty(x: int) = if (x == 0) 1 else x * faculty(x - 1) + def faculty(x: Int) = if (x == 0) 1 else x * faculty(x - 1) } diff --git a/test/files/neg/imp2.scala b/test/files/neg/imp2.scala index 20b3df5d91..9937262188 100644 --- a/test/files/neg/imp2.scala +++ b/test/files/neg/imp2.scala @@ -1,5 +1,5 @@ abstract class C { - val f: int + val f: Int } object A extends C { diff --git a/test/files/neg/patternalts.scala b/test/files/neg/patternalts.scala index 091b6e51ad..62d0325a8b 100644 --- a/test/files/neg/patternalts.scala +++ b/test/files/neg/patternalts.scala @@ -3,6 +3,6 @@ object Test { case List(x) | List() => Console.println(x) } List(2) match { - case List(_: int) | List() => Console.println() + case List(_: Int) | List() => Console.println() } } diff --git a/test/files/neg/viewtest.scala b/test/files/neg/viewtest.scala index 6d5f96bd81..4c603b61bc 100644 --- a/test/files/neg/viewtest.scala +++ b/test/files/neg/viewtest.scala @@ -10,7 +10,7 @@ trait Ordered[+a] { * x == 0 iff this == that * x > 0 iff this > that */ - def compareTo [b >: a <% Ordered[b]](that: b): int + def compareTo [b >: a <% Ordered[b]](that: b): Int def < [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) < 0 @@ -25,13 +25,13 @@ trait Ordered[+a] { object O { implicit def view1(x: String): Ordered[String] = new Ordered[String] { - def compareTo [b >: String <% Ordered[b]](y: b): int = y match { + def compareTo [b >: String <% Ordered[b]](y: b): Int = y match { case y1: String => x compareTo y1 case _ => -(y compareTo x) } } implicit def view2(x: char): Ordered[char] = new Ordered[char] { - def compareTo [b >: char <% Ordered[b]](y: b): int = y match { + def compareTo [b >: char <% Ordered[b]](y: b): Int = y match { case y1: char => x - y1 case _ => -(y compareTo x) } @@ -39,11 +39,11 @@ object O { implicit def view3[a <% Ordered[a]](x: List[a]): Ordered[List[a]] = new Ordered[List[a]] { - def compareTo [b >: List[a] <% Ordered[b]](y: b): int = y match { + def compareTo [b >: List[a] <% Ordered[b]](y: b): Int = y match { case y1: List[a] => compareLists(x, y1) case _ => -(y compareTo x) } - private def compareLists(xs: List[a], ys: List[a]): int = { + private def compareLists(xs: List[a], ys: List[a]): Int = { if (xs.isEmpty && ys.isEmpty) 0 else if (xs.isEmpty) -1 else if (ys.isEmpty) 1 @@ -77,7 +77,7 @@ class Node[a <% Ordered[a]](elem: a, l: Tree[a], r: Tree[a]) extends Tree[a] { } case class Str(elem: String) extends Ordered[Str] { - def compareTo[b >: Str <% Ordered[b]](that: b): int = that match { + def compareTo[b >: Str <% Ordered[b]](that: b): Int = that match { case that1: Str => this.elem compareTo that1.elem case _ => -(that compareTo this) } |