summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/accesses.check16
-rw-r--r--test/files/neg/accesses.scala32
-rw-r--r--test/files/neg/bug588.check6
-rw-r--r--test/files/neg/bug588.scala4
-rw-r--r--test/files/neg/bug856.check4
-rw-r--r--test/files/neg/bug856.scala4
-rw-r--r--test/files/neg/bug875.scala8
-rw-r--r--test/files/neg/checksensible.check2
-rw-r--r--test/files/neg/checksensible.scala4
-rw-r--r--test/files/neg/forward.check6
-rw-r--r--test/files/neg/forward.scala24
11 files changed, 55 insertions, 55 deletions
diff --git a/test/files/neg/accesses.check b/test/files/neg/accesses.check
index 11d313e534..627c17dd90 100644
--- a/test/files/neg/accesses.check
+++ b/test/files/neg/accesses.check
@@ -1,17 +1,17 @@
-accesses.scala:23: error: error overriding method f2 in class A of type => unit;
+accesses.scala:23: error: error overriding method f2 in class A of type => Unit;
method f2 has weaker access privileges; it should not be private
- private def f2: unit = ()
+ private def f2: Unit = ()
^
-accesses.scala:24: error: error overriding method f3 in class A of type => unit;
+accesses.scala:24: error: error overriding method f3 in class A of type => Unit;
method f3 has weaker access privileges; it should be at least protected
- private[p2] def f3: unit = ()
+ private[p2] def f3: Unit = ()
^
-accesses.scala:25: error: error overriding method f4 in class A of type => unit;
+accesses.scala:25: error: error overriding method f4 in class A of type => Unit;
method f4 has weaker access privileges; it should be at least private[p1]
- private[p2] def f4: unit
+ private[p2] def f4: Unit
^
-accesses.scala:26: error: error overriding method f5 in class A of type => unit;
+accesses.scala:26: error: error overriding method f5 in class A of type => Unit;
method f5 has weaker access privileges; it should be at least protected[p1]
- protected[p2] def f5: unit
+ protected[p2] def f5: Unit
^
four errors found
diff --git a/test/files/neg/accesses.scala b/test/files/neg/accesses.scala
index 731bf664be..2a6b45c35b 100644
--- a/test/files/neg/accesses.scala
+++ b/test/files/neg/accesses.scala
@@ -1,27 +1,27 @@
package test.p1.p2
abstract class A {
- private[p2] def f2: unit
- protected def f3: unit
- private[p1] def f4: unit
- protected[p1] def f5: unit
+ private[p2] def f2: Unit
+ protected def f3: Unit
+ private[p1] def f4: Unit
+ protected[p1] def f5: Unit
}
abstract class OK1 extends A {
- private[p1] def f2: unit
- protected[p2] def f3: unit
- private[test] def f4: unit
- protected[test] def f5: unit
+ private[p1] def f2: Unit
+ protected[p2] def f3: Unit
+ private[test] def f4: Unit
+ protected[test] def f5: Unit
}
abstract class OK2 extends A {
- protected[p1] def f2: unit
- def f3: unit
- protected[p1] def f4: unit
- def f5: unit
+ protected[p1] def f2: Unit
+ def f3: Unit
+ protected[p1] def f4: Unit
+ def f5: Unit
}
abstract class Err1 extends A {
- private def f2: unit = ()
- private[p2] def f3: unit = ()
- private[p2] def f4: unit
- protected[p2] def f5: unit
+ private def f2: Unit = ()
+ private[p2] def f3: Unit = ()
+ private[p2] def f4: Unit
+ protected[p2] def f5: Unit
}
diff --git a/test/files/neg/bug588.check b/test/files/neg/bug588.check
index 59e4229192..f4129d62a2 100644
--- a/test/files/neg/bug588.check
+++ b/test/files/neg/bug588.check
@@ -1,8 +1,8 @@
bug588.scala:3: error: double definition:
-method visit:((int) => String)boolean and
-method visit:((int) => unit)boolean at line 2
+method visit:((Int) => String)Boolean and
+method visit:((Int) => unit)Boolean at line 2
have same type after erasure: (Function1)Boolean
- def visit(f: int => String): boolean
+ def visit(f: Int => String): Boolean
^
bug588.scala:10: error: double definition:
method f:(Test.this.TypeB)Unit and
diff --git a/test/files/neg/bug588.scala b/test/files/neg/bug588.scala
index bbb79ed79e..1713df1330 100644
--- a/test/files/neg/bug588.scala
+++ b/test/files/neg/bug588.scala
@@ -1,6 +1,6 @@
abstract class Test0 {
- def visit(f: int => unit): boolean
- def visit(f: int => String): boolean
+ def visit(f: Int => unit): Boolean
+ def visit(f: Int => String): Boolean
}
trait Test {
type TypeA <: TraitA;
diff --git a/test/files/neg/bug856.check b/test/files/neg/bug856.check
index 3ab4ce6c70..e1d0801c5f 100644
--- a/test/files/neg/bug856.check
+++ b/test/files/neg/bug856.check
@@ -1,4 +1,4 @@
-bug856.scala:3: error: class ComplexRect needs to be abstract, since method _2 in trait Product2 of type => double is not defined
-class ComplexRect(val _1:double, _2:double) extends Complex {
+bug856.scala:3: error: class ComplexRect needs to be abstract, since method _2 in trait Product2 of type => Double is not defined
+class ComplexRect(val _1:Double, _2:Double) extends Complex {
^
one error found
diff --git a/test/files/neg/bug856.scala b/test/files/neg/bug856.scala
index 1f69b592bf..fea216bfad 100644
--- a/test/files/neg/bug856.scala
+++ b/test/files/neg/bug856.scala
@@ -1,6 +1,6 @@
-trait Complex extends Product2[double,double]
+trait Complex extends Product2[Double,Double]
-class ComplexRect(val _1:double, _2:double) extends Complex {
+class ComplexRect(val _1:Double, _2:Double) extends Complex {
override def toString = "ComplexRect("+_1+","+_2+")"
}
diff --git a/test/files/neg/bug875.scala b/test/files/neg/bug875.scala
index af0a74d480..9c579b0166 100644
--- a/test/files/neg/bug875.scala
+++ b/test/files/neg/bug875.scala
@@ -1,14 +1,14 @@
object Test extends Application {
val xs = List(4, 5, 6)
val ys = List(1, 2, 3, xs: _*)
- def mkList(x: int) = List(x)
- def mkList(x: boolean) = List(x)
+ def mkList(x: Int) = List(x)
+ def mkList(x: Boolean) = List(x)
mkList(xs: _*)
- def f(x: int*) = List(x: _*)
+ def f(x: Int*) = List(x: _*)
- def f(x: boolean, y: int*) = List(y: _*)
+ def f(x: Boolean, y: Int*) = List(y: _*)
def g[a](x: a*) = List(x: _*)
diff --git a/test/files/neg/checksensible.check b/test/files/neg/checksensible.check
index 47abfe3589..21d0d819ea 100644
--- a/test/files/neg/checksensible.check
+++ b/test/files/neg/checksensible.check
@@ -17,7 +17,7 @@ checksensible.scala:8: warning: comparing values of types Int and Boolean using
println(1 != true)
^
checksensible.scala:10: warning: comparing a fresh object using `==' will always yield false
- println(((x: int) => x + 1) == null)
+ println(((x: Int) => x + 1) == null)
^
checksensible.scala:11: warning: comparing a fresh object using `==' will always yield false
println(new Object == new Object)
diff --git a/test/files/neg/checksensible.scala b/test/files/neg/checksensible.scala
index 3a9fca2a08..1fed2e4b57 100644
--- a/test/files/neg/checksensible.scala
+++ b/test/files/neg/checksensible.scala
@@ -7,7 +7,7 @@ class Test {
println(1 == "abc")
println(1 != true)
- println(((x: int) => x + 1) == null)
+ println(((x: Int) => x + 1) == null)
println(new Object == new Object)
println(new Array(1) != new Array(1))
@@ -32,7 +32,7 @@ class Test {
println(new Object == 1)
println(1 == (new Object))
- def isabstract: int
+ def isabstract: Int
println(1 != println)
println(1 != 'sym)
diff --git a/test/files/neg/forward.check b/test/files/neg/forward.check
index e2ff9cef76..252c990370 100644
--- a/test/files/neg/forward.check
+++ b/test/files/neg/forward.check
@@ -1,10 +1,10 @@
forward.scala:6: error: forward reference extends over definition of value x
- def f: int = x;
+ def f: Int = x;
^
forward.scala:10: error: forward reference extends over definition of value x
- def f: int = g;
+ def f: Int = g;
^
forward.scala:15: error: forward reference extends over definition of variable x
- def f: int = g;
+ def f: Int = g;
^
three errors found
diff --git a/test/files/neg/forward.scala b/test/files/neg/forward.scala
index b7f7a50583..d5c0851f09 100644
--- a/test/files/neg/forward.scala
+++ b/test/files/neg/forward.scala
@@ -1,24 +1,24 @@
object Test {
- def f: int = x;
- val x: int = f;
+ def f: Int = x;
+ val x: Int = f;
{
- def f: int = x;
- val x: int = f;
+ def f: Int = x;
+ val x: Int = f;
}
{
- def f: int = g;
- val x: int = f;
- def g: int = x;
+ def f: Int = g;
+ val x: Int = f;
+ def g: Int = x;
}
{
- def f: int = g;
- var x: int = f;
- def g: int = x;
+ def f: Int = g;
+ var x: Int = f;
+ def g: Int = x;
}
{
- def f: int = g;
+ def f: Int = g;
Console.println("foo");
- def g: int = f;
+ def g: Int = f;
}
}