diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug563.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug700.check | 2 | ||||
-rw-r--r-- | test/files/neg/bug700.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug910.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug910.scala | 2 | ||||
-rw-r--r-- | test/files/neg/constrs.check | 2 | ||||
-rw-r--r-- | test/files/neg/constrs.scala | 2 | ||||
-rw-r--r-- | test/files/neg/gadts1.scala | 8 | ||||
-rw-r--r-- | test/files/neg/implicits.check | 2 | ||||
-rw-r--r-- | test/files/neg/implicits.scala | 4 | ||||
-rw-r--r-- | test/files/neg/overload.check | 2 | ||||
-rw-r--r-- | test/files/neg/overload.scala | 2 | ||||
-rw-r--r-- | test/files/neg/t0218.scala | 2 | ||||
-rw-r--r-- | test/files/neg/viewtest.scala | 16 |
14 files changed, 26 insertions, 26 deletions
diff --git a/test/files/neg/bug563.scala b/test/files/neg/bug563.scala index d8e026e656..624b83b1fa 100644 --- a/test/files/neg/bug563.scala +++ b/test/files/neg/bug563.scala @@ -1,7 +1,7 @@ object Test { def map[A,R](a : List[A], f : A => R) : List[R] = a.map(f); - def split(sn : Iterable[List[Cell[int]]]) : unit = + def split(sn : Iterable[List[Cell[Int]]]) : Unit = for (n <- sn) map(n,ptr => new Cell(ptr.elem)); } diff --git a/test/files/neg/bug700.check b/test/files/neg/bug700.check index 33a67e5094..5c2854069c 100644 --- a/test/files/neg/bug700.check +++ b/test/files/neg/bug700.check @@ -1,4 +1,4 @@ bug700.scala:6: error: method foobar in trait Foo is accessed from super. It may not be abstract unless it is overridden by a member declared `abstract' and `override' - def foobar: unit = super.foobar + def foobar: Unit = super.foobar ^ one error found diff --git a/test/files/neg/bug700.scala b/test/files/neg/bug700.scala index 7477bb54f6..b08c8b5529 100644 --- a/test/files/neg/bug700.scala +++ b/test/files/neg/bug700.scala @@ -3,7 +3,7 @@ trait Foo { } trait Bar extends Foo { - def foobar: unit = super.foobar + def foobar: Unit = super.foobar } // the following definition breaks the compiler diff --git a/test/files/neg/bug910.check b/test/files/neg/bug910.check index fe4ad4fca4..2bc2d986fa 100644 --- a/test/files/neg/bug910.check +++ b/test/files/neg/bug910.check @@ -1,6 +1,6 @@ bug910.scala:4: error: type mismatch; found : Seq[Char] - required: scala.Seq[int] - val y: Seq[int] = rest + required: scala.Seq[Int] + val y: Seq[Int] = rest ^ one error found diff --git a/test/files/neg/bug910.scala b/test/files/neg/bug910.scala index 2f28ea408f..540ee7001d 100644 --- a/test/files/neg/bug910.scala +++ b/test/files/neg/bug910.scala @@ -1,7 +1,7 @@ object RegExpTest1 extends Application { def co(x: Seq[Char]) = x match { case Seq('s','c','a','l','a', rest @ _*) => - val y: Seq[int] = rest + val y: Seq[Int] = rest y } } diff --git a/test/files/neg/constrs.check b/test/files/neg/constrs.check index 3524709785..4f4a12bc13 100644 --- a/test/files/neg/constrs.check +++ b/test/files/neg/constrs.check @@ -8,7 +8,7 @@ constrs.scala:10: error: called constructor's definition must precede calling co def this() = this("abc") ^ constrs.scala:12: error: called constructor's definition must precede calling constructor's definition - def this(x: boolean) = this(x) + def this(x: Boolean) = this(x) ^ constrs.scala:16: error: type mismatch; found : Int(1) diff --git a/test/files/neg/constrs.scala b/test/files/neg/constrs.scala index 969f593a2d..016df098f0 100644 --- a/test/files/neg/constrs.scala +++ b/test/files/neg/constrs.scala @@ -9,7 +9,7 @@ object test { class Foo(x: Int) { def this() = this("abc") def this(x: String) = this(1) - def this(x: boolean) = this(x) + def this(x: Boolean) = this(x) } class Bar[a](x: a) { diff --git a/test/files/neg/gadts1.scala b/test/files/neg/gadts1.scala index 67aef4f2d9..07200ff7aa 100644 --- a/test/files/neg/gadts1.scala +++ b/test/files/neg/gadts1.scala @@ -1,8 +1,8 @@ object Test{ abstract class Number -case class Int(n: int) extends Number -case class Double(d: double) extends Number +case class Int(n: scala.Int) extends Number +case class Double(d: scala.Double) extends Number trait Term[+a] case class Cell[a](var x: a) extends Term[a] @@ -10,7 +10,7 @@ case class NumTerm(val n: Number) extends Term[Number] class IntTerm(n: Int) extends NumTerm(n) with Term[Int] -def f[a](t:Term[a], c:Cell[a]): unit = +def f[a](t:Term[a], c:Cell[a]): Unit = t match { case NumTerm(n) => c.x = Double(1.0) } @@ -18,7 +18,7 @@ def f[a](t:Term[a], c:Cell[a]): unit = val x:Term[Number] = NumTerm(Int(5)) -def main(args: Array[String]): unit = { +def main(args: Array[String]): Unit = { val cell = Cell[Int](Int(6)) Console.println(cell) f[Int](new IntTerm(Int(5)), cell) diff --git a/test/files/neg/implicits.check b/test/files/neg/implicits.check index d94e1f27f2..337560f423 100644 --- a/test/files/neg/implicits.check +++ b/test/files/neg/implicits.check @@ -3,7 +3,7 @@ implicits.scala:21: error: type mismatch; required: ?{val +: ?} Note that implicit conversions are not applicable because they are ambiguous: both method any2plus in object Sub of type (x: Any)Sub.Plus - and method pos2int in object Super of type (p: Pos)int + and method pos2int in object Super of type (p: Pos)Int are possible conversion functions from Pos to ?{val +: ?} f(p+1) ^ diff --git a/test/files/neg/implicits.scala b/test/files/neg/implicits.scala index be85029660..846591e22d 100644 --- a/test/files/neg/implicits.scala +++ b/test/files/neg/implicits.scala @@ -3,7 +3,7 @@ class Pos class Super object Super { - implicit def pos2int(p: Pos): int = 0 + implicit def pos2int(p: Pos): Int = 0 } object Sub extends Super { @@ -17,7 +17,7 @@ object Test { import Super._ import Sub._ val p = new Pos - def f(x: int): int = x + def f(x: Int): Int = x f(p+1) } diff --git a/test/files/neg/overload.check b/test/files/neg/overload.check index 0faa97adb1..abfabaf3f2 100644 --- a/test/files/neg/overload.check +++ b/test/files/neg/overload.check @@ -1,6 +1,6 @@ overload.scala:10: error: ambiguous reference to overloaded definition, both method f in class D of type (x: Any)Unit -and method f in class C of type (x: int)Unit +and method f in class C of type (x: Int)Unit match argument types (Int) (new D).f(1) ^ diff --git a/test/files/neg/overload.scala b/test/files/neg/overload.scala index 311ea3874b..6ad911e90e 100644 --- a/test/files/neg/overload.scala +++ b/test/files/neg/overload.scala @@ -1,5 +1,5 @@ class C { - def f(x: int) {} + def f(x: Int) {} } class D extends C { diff --git a/test/files/neg/t0218.scala b/test/files/neg/t0218.scala index 282e85e814..319be82a7a 100644 --- a/test/files/neg/t0218.scala +++ b/test/files/neg/t0218.scala @@ -6,7 +6,7 @@ trait APQ { type PP = P - def pq(numQueens: int, numRows: int) : List[Placement] = { + def pq(numQueens: Int, numRows: Int) : List[Placement] = { List(new PP) } } diff --git a/test/files/neg/viewtest.scala b/test/files/neg/viewtest.scala index 778e672d91..5e7d624d23 100644 --- a/test/files/neg/viewtest.scala +++ b/test/files/neg/viewtest.scala @@ -12,13 +12,13 @@ trait Ordered[+a] { */ def compareTo [b >: a <% Ordered[b]](that: b): Int - def < [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) < 0 + def < [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) < 0 - def > [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) > 0 + def > [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) > 0 - def <= [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) <= 0 + def <= [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) <= 0 - def >= [b >: a <% Ordered[b]](that: b): boolean = (this compareTo that) >= 0 + def >= [b >: a <% Ordered[b]](that: b): Boolean = (this compareTo that) >= 0 } @@ -30,9 +30,9 @@ object O { 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 { - case y1: char => x - y1 + implicit def view2(x: Char): Ordered[Char] = new Ordered[Char] { + def compareTo [b >: Char <% Ordered[b]](y: b): Int = y match { + case y1: Char => x - y1 case _ => -(y compareTo x) } } @@ -106,7 +106,7 @@ object Test { Console.println(t.elements) } { - var t: Tree[List[char]] = Empty + var t: Tree[List[Char]] = Empty for (s <- args) { t = t insert toCharList(s) } |