summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-01 05:10:58 +0000
committerPaul Phillips <paulp@improving.org>2011-05-01 05:10:58 +0000
commit269ea9ab579f0e7ff14df31caa0981627f051958 (patch)
tree962682a6522e59ee96fb66724d4a48cf24069868 /test/files/neg
parenta02b2daa2a46661a3c108d26c738b4dbb836ea4d (diff)
downloadscala-269ea9ab579f0e7ff14df31caa0981627f051958.tar.gz
scala-269ea9ab579f0e7ff14df31caa0981627f051958.tar.bz2
scala-269ea9ab579f0e7ff14df31caa0981627f051958.zip
Since I don't want to commit anything "interest...
Since I don't want to commit anything "interesting" until we ship 2.9, a few uninteresting cleanups involving how types are printed, getting some debugging code in shape to prepare for the long winter ahead, etc. No review.
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/abstract-class-error.check2
-rw-r--r--test/files/neg/names-defaults-neg.check16
-rw-r--r--test/files/neg/t3115.check4
-rw-r--r--test/files/neg/t3774.check2
-rw-r--r--test/files/neg/tcpoly_infer_ticket1162.check2
-rw-r--r--test/files/neg/varargs.check6
6 files changed, 16 insertions, 16 deletions
diff --git a/test/files/neg/abstract-class-error.check b/test/files/neg/abstract-class-error.check
index b8a0c6e70b..87d148ecc5 100644
--- a/test/files/neg/abstract-class-error.check
+++ b/test/files/neg/abstract-class-error.check
@@ -1,4 +1,4 @@
-S.scala:1: error: class S needs to be abstract, since method g in class J of type (y: Int,z: java.util.List)Int is not defined
+S.scala:1: error: class S needs to be abstract, since method g in class J of type (y: Int, z: java.util.List)Int is not defined
(Note that java.util.List does not match java.util.List[String]. To implement a raw type, use java.util.List[_])
class S extends J {
^
diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check
index 5d409f18a8..d2bd2d123b 100644
--- a/test/files/neg/names-defaults-neg.check
+++ b/test/files/neg/names-defaults-neg.check
@@ -1,4 +1,4 @@
-names-defaults-neg.scala:65: error: not enough arguments for method apply: (a: Int,b: String)(c: Int*)Fact in object Fact.
+names-defaults-neg.scala:65: error: not enough arguments for method apply: (a: Int, b: String)(c: Int*)Fact in object Fact.
Unspecified value parameter b.
val fac = Fact(1)(2, 3)
^
@@ -40,8 +40,8 @@ names-defaults-neg.scala:26: error: Int does not take parameters
test3(b = 3, a = 1)(3)
^
names-defaults-neg.scala:35: error: ambiguous reference to overloaded definition,
-both method f in object t1 of type (b: String,a: Int)java.lang.String
-and method f in object t1 of type (a: Int,b: String)java.lang.String
+both method f in object t1 of type (b: String, a: Int)java.lang.String
+and method f in object t1 of type (a: Int, b: String)java.lang.String
match argument types (b: java.lang.String,a: Int)
t1.f(b = "dkljf", a = 1)
^
@@ -59,7 +59,7 @@ match argument types (Int)
^
names-defaults-neg.scala:49: error: ambiguous reference to overloaded definition,
both method g in object t7 of type (a: B)java.lang.String
-and method g in object t7 of type (a: C,b: Int*)java.lang.String
+and method g in object t7 of type (a: C, b: Int*)java.lang.String
match argument types (C)
t7.g(new C()) // ambigous reference
^
@@ -73,19 +73,19 @@ names-defaults-neg.scala:55: error: when using named arguments, the vararg param
test5(b = "dlkj")
^
names-defaults-neg.scala:61: error: ambiguous reference to overloaded definition,
-both method f in object t8 of type (b: String,a: Int)java.lang.String
-and method f in object t8 of type (a: Int,b: java.lang.Object)java.lang.String
+both method f in object t8 of type (b: String, a: Int)java.lang.String
+and method f in object t8 of type (a: Int, b: java.lang.Object)java.lang.String
match argument types (a: Int,b: java.lang.String) and expected result type Any
println(t8.f(a = 0, b = "1")) // ambigous reference
^
-names-defaults-neg.scala:69: error: wrong number of arguments for <none>: (x: Int,y: String)A1
+names-defaults-neg.scala:69: error: wrong number of arguments for <none>: (x: Int, y: String)A1
A1() match { case A1(_) => () }
^
names-defaults-neg.scala:76: error: no type parameters for method test4: (x: T[T[List[T[X forSome { type X }]]]])T[T[List[T[X forSome { type X }]]]] exist so that it can be applied to arguments (List[Int])
--- because ---
argument expression's type is not compatible with formal parameter type;
found : List[Int]
- required: ?T[ ?T[ List[?T[ X forSome { type X } ]] ] ]
+ required: ?T[?T[List[?T[X forSome { type X }]]]]
Error occurred in an application involving default arguments.
test4()
^
diff --git a/test/files/neg/t3115.check b/test/files/neg/t3115.check
index 3da8c8d1c6..c128ff5f3f 100644
--- a/test/files/neg/t3115.check
+++ b/test/files/neg/t3115.check
@@ -1,11 +1,11 @@
t3115.scala:6: error: object Math in object sc is deprecated:
println(sc.Math)
^
-t3115.scala:7: error: object Math in package scala is deprecated: use the scala.math package object instead.
+t3115.scala:7: error: object Math is deprecated: use the scala.math package object instead.
(Example package object usage: scala.math.Pi )
println(scala.Math)
^
-t3115.scala:8: error: object Math in package scala is deprecated: use the scala.math package object instead.
+t3115.scala:8: error: object Math is deprecated: use the scala.math package object instead.
(Example package object usage: scala.math.Pi )
scala.Math.Pi
^
diff --git a/test/files/neg/t3774.check b/test/files/neg/t3774.check
index ea35c50541..cce2d7076c 100644
--- a/test/files/neg/t3774.check
+++ b/test/files/neg/t3774.check
@@ -1,6 +1,6 @@
t3774.scala:4: error: overloaded method value ++ with alternatives:
[B1 >: List[Int]](xs: scala.collection.GenTraversableOnce[((Int, Int), B1)])scala.collection.immutable.Map[(Int, Int),B1] <and>
- [B >: ((Int, Int), List[Int]),That](that: scala.collection.GenTraversableOnce[B])(implicit bf: scala.collection.generic.CanBuildFrom[scala.collection.immutable.Map[(Int, Int),List[Int]],B,That])That
+ [B >: ((Int, Int), List[Int]), That](that: scala.collection.GenTraversableOnce[B])(implicit bf: scala.collection.generic.CanBuildFrom[scala.collection.immutable.Map[(Int, Int),List[Int]],B,That])That
cannot be applied to (scala.collection.immutable.IndexedSeq[((Int, Int), scala.collection.immutable.Range.Inclusive)])
Map[(Int,Int),List[Int]]() ++ (for(x <- 0 to 1 ; y <- 0 to 1) yield {(x,y)-> (0 to 1)})
^
diff --git a/test/files/neg/tcpoly_infer_ticket1162.check b/test/files/neg/tcpoly_infer_ticket1162.check
index 03334222c1..67b79e7f3c 100644
--- a/test/files/neg/tcpoly_infer_ticket1162.check
+++ b/test/files/neg/tcpoly_infer_ticket1162.check
@@ -1,4 +1,4 @@
-tcpoly_infer_ticket1162.scala:6: error: wrong number of type parameters for method apply: [A,B,F[_]]()Test.Lift[A,B,F] in object Lift
+tcpoly_infer_ticket1162.scala:6: error: wrong number of type parameters for method apply: [A, B, F[_]]()Test.Lift[A,B,F] in object Lift
def simplify[A,B]: Expression[A,B] = Lift[A,B]()
^
one error found
diff --git a/test/files/neg/varargs.check b/test/files/neg/varargs.check
index 1352dd968c..676a611341 100644
--- a/test/files/neg/varargs.check
+++ b/test/files/neg/varargs.check
@@ -1,10 +1,10 @@
-varargs.scala:16: error: A method with a varargs annotation produces a forwarder method with the same signature (a: Int,b: Array[java.lang.String])Int as an existing method.
+varargs.scala:16: error: A method with a varargs annotation produces a forwarder method with the same signature (a: Int, b: Array[java.lang.String])Int as an existing method.
@varargs def v1(a: Int, b: String*) = a + b.length
^
varargs.scala:19: error: A method without repeated parameters cannot be annotated with the `varargs` annotation.
@varargs def nov(a: Int) = 0
^
-varargs.scala:21: error: A method with a varargs annotation produces a forwarder method with the same signature (a: Int,b: Array[java.lang.String])Int as an existing method.
+varargs.scala:21: error: A method with a varargs annotation produces a forwarder method with the same signature (a: Int, b: Array[java.lang.String])Int as an existing method.
@varargs def v2(a: Int, b: String*) = 0
^
-three errors found \ No newline at end of file
+three errors found