From d27e89c0bc0ee1775eae09238319c44e85a44d5d Mon Sep 17 00:00:00 2001 From: Geoffrey Washburn Date: Tue, 12 Aug 2008 14:39:55 +0000 Subject: Fixing more deprecation warnings. --- test/files/neg/bug1112.check | 2 +- test/files/neg/bug1112.scala | 6 +++--- test/files/neg/bug414.scala | 4 ++-- test/files/neg/constrs.check | 4 ++-- test/files/neg/constrs.scala | 6 +++--- test/files/neg/faculty.check | 2 +- test/files/neg/faculty.scala | 2 +- test/files/neg/imp2.scala | 2 +- test/files/neg/patternalts.scala | 2 +- test/files/neg/viewtest.scala | 12 ++++++------ test/files/pos/bug1006.scala | 2 +- test/files/pos/bug201.scala | 2 +- test/files/pos/bug796.scala | 2 +- test/files/pos/tcpoly_seq.scala | 2 +- test/files/pos/unapplyVal.scala | 2 +- 15 files changed, 26 insertions(+), 26 deletions(-) (limited to 'test/files') 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) } diff --git a/test/files/pos/bug1006.scala b/test/files/pos/bug1006.scala index 91eb2d9b7d..34080b68c1 100644 --- a/test/files/pos/bug1006.scala +++ b/test/files/pos/bug1006.scala @@ -10,6 +10,6 @@ def test() { def myVal: T1 = value } - Console.println(new B[int](23).myVal) + Console.println(new B[Int](23).myVal) } } diff --git a/test/files/pos/bug201.scala b/test/files/pos/bug201.scala index 53dac21ef0..b0c6b8da43 100644 --- a/test/files/pos/bug201.scala +++ b/test/files/pos/bug201.scala @@ -1,7 +1,7 @@ class C[a] { def f: a = f; } class D[b] { class E extends C[b]; } object Test { - val d = new D[int]; + val d = new D[Int]; def e = new d.E; e.f; } diff --git a/test/files/pos/bug796.scala b/test/files/pos/bug796.scala index dfd312ec67..2e57f60502 100644 --- a/test/files/pos/bug796.scala +++ b/test/files/pos/bug796.scala @@ -10,7 +10,7 @@ object Test extends Application { object Twice { def apply(x: Int) = x * 2 - def unapply(x: Int): Option[Tuple1[int]] = + def unapply(x: Int): Option[Tuple1[Int]] = if (x % 2 == 0) Some(Tuple1(x / 2)) else None } diff --git a/test/files/pos/tcpoly_seq.scala b/test/files/pos/tcpoly_seq.scala index e05a2322e4..f776ce3fe4 100644 --- a/test/files/pos/tcpoly_seq.scala +++ b/test/files/pos/tcpoly_seq.scala @@ -155,7 +155,7 @@ trait HOSeq { def map[K](f: T=>K): MapResult[K] def filter(f: T=>Boolean): FilterResult - def subseq(from: int, to: int): Subseq + def subseq(from: Int, to: Int): Subseq def flatMap[S <: Seq[K], K](f: T => S): S#Concat // legal? def concat(others: Seq[T]): Concat */ diff --git a/test/files/pos/unapplyVal.scala b/test/files/pos/unapplyVal.scala index 5da8b14b69..338cdb1839 100644 --- a/test/files/pos/unapplyVal.scala +++ b/test/files/pos/unapplyVal.scala @@ -6,7 +6,7 @@ class Async { class Buffer { val Put = new Async - //case class Put(x: int) + //case class Put(x: Int) def joinPat(x: Any): Unit = { x match { -- cgit v1.2.3