diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-20 14:23:40 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-03-20 18:42:09 -0700 |
commit | 6d7bcd5818b856d4596b57b7e9f1543b71ed7329 (patch) | |
tree | 0bc4788208a585ebd25e36bc929c667d784ce6d0 /test/files/neg | |
parent | b9e933ffca8108ed86c09a298a44636b714f7a19 (diff) | |
download | scala-6d7bcd5818b856d4596b57b7e9f1543b71ed7329.tar.gz scala-6d7bcd5818b856d4596b57b7e9f1543b71ed7329.tar.bz2 scala-6d7bcd5818b856d4596b57b7e9f1543b71ed7329.zip |
Lots of tedious warning and tree printing work.
Fewer deprecation warnings, prettier trees, prettier
symbols, more polished error messages.
Oh the interesting people you meet handling warnings, I
feel sorry for you all that I get to do it all the time.
One of the characters I met invited me into the "Dead Code
Society" and that's what I'm doing on Tuesdays now. No of
course you haven't, it's a SECRET society.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t1364.check | 2 | ||||
-rw-r--r-- | test/files/neg/t1477.check | 2 | ||||
-rw-r--r-- | test/files/neg/t2070.check | 3 | ||||
-rw-r--r-- | test/files/neg/t4044.check | 9 | ||||
-rw-r--r-- | test/files/neg/t5152.check | 6 | ||||
-rw-r--r-- | test/files/neg/t708.check | 2 | ||||
-rw-r--r-- | test/files/neg/t742.check | 3 | ||||
-rw-r--r-- | test/files/neg/tcpoly_override.check | 3 | ||||
-rw-r--r-- | test/files/neg/tcpoly_typealias.check | 9 | ||||
-rw-r--r-- | test/files/neg/tcpoly_variance_enforce.check | 34 |
10 files changed, 48 insertions, 25 deletions
diff --git a/test/files/neg/t1364.check b/test/files/neg/t1364.check index 78375333c2..cb8803abdc 100644 --- a/test/files/neg/t1364.check +++ b/test/files/neg/t1364.check @@ -1,4 +1,4 @@ -t1364.scala:9: error: overriding type T in trait A with bounds >: Nothing <: AnyRef{type S[-U]}; +t1364.scala:9: error: overriding type T in trait A with bounds <: AnyRef{type S[-U]}; type T has incompatible type type T = { type S[U] = U } ^ diff --git a/test/files/neg/t1477.check b/test/files/neg/t1477.check index e497637857..72bffa3270 100644 --- a/test/files/neg/t1477.check +++ b/test/files/neg/t1477.check @@ -1,4 +1,4 @@ -t1477.scala:13: error: overriding type V in trait C with bounds >: Nothing <: Middle.this.D; +t1477.scala:13: error: overriding type V in trait C with bounds <: Middle.this.D; type V is a volatile type; cannot override a type with non-volatile upper bound type V <: (D with U) ^ diff --git a/test/files/neg/t2070.check b/test/files/neg/t2070.check index bd049409a8..ef1d08f7b7 100644 --- a/test/files/neg/t2070.check +++ b/test/files/neg/t2070.check @@ -1,5 +1,6 @@ t2070.scala:8: error: The kind of trait T does not conform to the expected kind of type T[X] in trait A. -t2070.B.T's type parameters do not match type T's expected parameters: type X (in object B) has one type parameter, but type X (in trait A) has none +t2070.B.T's type parameters do not match type T's expected parameters: +type X (in object B) has one type parameter, but type X (in trait A) has none trait T[X[_]] ^ one error found diff --git a/test/files/neg/t4044.check b/test/files/neg/t4044.check index 75dcf63bfe..41a04f69b9 100644 --- a/test/files/neg/t4044.check +++ b/test/files/neg/t4044.check @@ -2,15 +2,18 @@ t4044.scala:9: error: AnyRef takes no type parameters, expected: one M[AnyRef] // error, (AnyRef :: *) not kind-conformant to (N :: * -> * -> *) ^ t4044.scala:9: error: kinds of the type arguments (<error>) do not conform to the expected kinds of the type parameters (type N). -<error>'s type parameters do not match type N's expected parameters: <none> has no type parameters, but type N has one +<error>'s type parameters do not match type N's expected parameters: +<none> has no type parameters, but type N has one M[AnyRef] // error, (AnyRef :: *) not kind-conformant to (N :: * -> * -> *) ^ t4044.scala:11: error: kinds of the type arguments (Test.A) do not conform to the expected kinds of the type parameters (type N). -Test.A's type parameters do not match type N's expected parameters: type _ has no type parameters, but type O has one +Test.A's type parameters do not match type N's expected parameters: +type _ has no type parameters, but type O has one M[A] // error, (A :: (* -> *) not kind-conformant to (N :: * -> * -> *) ^ t4044.scala:15: error: kinds of the type arguments (Test.C) do not conform to the expected kinds of the type parameters (type N). -Test.C's type parameters do not match type N's expected parameters: type _ has one type parameter, but type _ has none +Test.C's type parameters do not match type N's expected parameters: +type _ has one type parameter, but type _ has none M[C] // error, (C :: (* -> * -> * -> *) not kind-conformant to (N :: * -> * -> *) ^ four errors found diff --git a/test/files/neg/t5152.check b/test/files/neg/t5152.check index 80e0141b64..fd510dbae0 100644 --- a/test/files/neg/t5152.check +++ b/test/files/neg/t5152.check @@ -1,9 +1,11 @@ t5152.scala:7: error: kinds of the type arguments (Test.B) do not conform to the expected kinds of the type parameters (type E) in class A. -Test.B's type parameters do not match type E's expected parameters: type E has one type parameter, but type _ has none +Test.B's type parameters do not match type E's expected parameters: +type E has one type parameter, but type _ has none class B[E[_]] extends A[B] { } // B is depth 2 but A requires 1 ^ t5152.scala:11: error: kinds of the type arguments (Test.B1) do not conform to the expected kinds of the type parameters (type E) in class A1. -Test.B1's type parameters do not match type E's expected parameters: type _ has no type parameters, but type G has one +Test.B1's type parameters do not match type E's expected parameters: +type _ has no type parameters, but type G has one class B1[E[_]] extends A1[B1] // B1 is depth 2 but A1 requires 3 ^ two errors found diff --git a/test/files/neg/t708.check b/test/files/neg/t708.check index 15a9c9ed93..4983aab613 100644 --- a/test/files/neg/t708.check +++ b/test/files/neg/t708.check @@ -1,4 +1,4 @@ -t708.scala:8: error: overriding type S in trait X with bounds >: Nothing <: A.this.T; +t708.scala:8: error: overriding type S in trait X with bounds <: A.this.T; type S has incompatible type override private[A] type S = Any; ^ diff --git a/test/files/neg/t742.check b/test/files/neg/t742.check index f587948ef1..d355715442 100644 --- a/test/files/neg/t742.check +++ b/test/files/neg/t742.check @@ -1,5 +1,6 @@ t742.scala:5: error: kinds of the type arguments (Crash._1,Crash._2,Any) do not conform to the expected kinds of the type parameters (type m,type n,type z). -Crash._1's type parameters do not match type m's expected parameters: type s1 has one type parameter, but type n has two +Crash._1's type parameters do not match type m's expected parameters: +type s1 has one type parameter, but type n has two type p = mul[_1, _2, Any] // mul[_1, _1, Any] needs -Yrecursion ^ one error found diff --git a/test/files/neg/tcpoly_override.check b/test/files/neg/tcpoly_override.check index 95529329e8..dbc3ff9461 100644 --- a/test/files/neg/tcpoly_override.check +++ b/test/files/neg/tcpoly_override.check @@ -1,5 +1,6 @@ tcpoly_override.scala:9: error: The kind of type T does not conform to the expected kind of type T[_] in trait A. -C.this.T's type parameters do not match type T's expected parameters: type T (in class C) has no type parameters, but type T (in trait A) has one +C.this.T's type parameters do not match type T's expected parameters: +type T (in class C) has no type parameters, but type T (in trait A) has one type T = B // This compiles well (@M: ... but it shouldn't) ^ one error found diff --git a/test/files/neg/tcpoly_typealias.check b/test/files/neg/tcpoly_typealias.check index 670add2c04..4beac0e440 100644 --- a/test/files/neg/tcpoly_typealias.check +++ b/test/files/neg/tcpoly_typealias.check @@ -1,13 +1,16 @@ tcpoly_typealias.scala:37: error: The kind of type m does not conform to the expected kind of type m[+x] in trait A. -BInv.this.m's type parameters do not match type m's expected parameters: type x (in trait BInv) is invariant, but type x (in trait A) is declared covariant +BInv.this.m's type parameters do not match type m's expected parameters: +type x (in trait BInv) is invariant, but type x (in trait A) is declared covariant type m[x] = FooCov[x] // error: invariant x in alias def ^ tcpoly_typealias.scala:41: error: The kind of type m does not conform to the expected kind of type m[+x] in trait A. -BCon.this.m's type parameters do not match type m's expected parameters: type x (in trait BCon) is contravariant, but type x (in trait A) is declared covariant +BCon.this.m's type parameters do not match type m's expected parameters: +type x (in trait BCon) is contravariant, but type x (in trait A) is declared covariant type m[-x] = FooCon[x] // error: contravariant x ^ tcpoly_typealias.scala:45: error: The kind of type m does not conform to the expected kind of type m[+x] in trait A. -BBound.this.m's type parameters do not match type m's expected parameters: type x (in trait BBound)'s bounds >: Nothing <: String are stricter than type x (in trait A)'s declared bounds >: Nothing <: Any +BBound.this.m's type parameters do not match type m's expected parameters: +type x (in trait BBound)'s bounds <: String are stricter than type x (in trait A)'s declared bounds >: Nothing <: Any type m[+x <: String] = FooBound[x] // error: x with stricter bound ^ three errors found diff --git a/test/files/neg/tcpoly_variance_enforce.check b/test/files/neg/tcpoly_variance_enforce.check index 44b5b2c15c..3299cc3435 100644 --- a/test/files/neg/tcpoly_variance_enforce.check +++ b/test/files/neg/tcpoly_variance_enforce.check @@ -1,45 +1,57 @@ tcpoly_variance_enforce.scala:15: error: kinds of the type arguments (FooInvar) do not conform to the expected kinds of the type parameters (type m) in trait coll. -FooInvar's type parameters do not match type m's expected parameters: type x (in class FooInvar) is invariant, but type x is declared covariant +FooInvar's type parameters do not match type m's expected parameters: +type x (in class FooInvar) is invariant, but type x is declared covariant object fcollinv extends coll[FooInvar] // error ^ tcpoly_variance_enforce.scala:16: error: kinds of the type arguments (FooContra) do not conform to the expected kinds of the type parameters (type m) in trait coll. -FooContra's type parameters do not match type m's expected parameters: type x (in class FooContra) is contravariant, but type x is declared covariant +FooContra's type parameters do not match type m's expected parameters: +type x (in class FooContra) is contravariant, but type x is declared covariant object fcollcon extends coll[FooContra] // error ^ tcpoly_variance_enforce.scala:17: error: kinds of the type arguments (FooString) do not conform to the expected kinds of the type parameters (type m) in trait coll. -FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: Any +FooString's type parameters do not match type m's expected parameters: +type x (in class FooString)'s bounds <: String are stricter than type x's declared bounds >: Nothing <: Any object fcollwb extends coll[FooString] // error ^ tcpoly_variance_enforce.scala:19: error: kinds of the type arguments (FooCov) do not conform to the expected kinds of the type parameters (type m) in trait coll2. -FooCov's type parameters do not match type m's expected parameters: type x (in class FooCov) is covariant, but type x is declared contravariant +FooCov's type parameters do not match type m's expected parameters: +type x (in class FooCov) is covariant, but type x is declared contravariant object fcoll2ok extends coll2[FooCov] // error ^ tcpoly_variance_enforce.scala:20: error: kinds of the type arguments (FooInvar) do not conform to the expected kinds of the type parameters (type m) in trait coll2. -FooInvar's type parameters do not match type m's expected parameters: type x (in class FooInvar) is invariant, but type x is declared contravariant +FooInvar's type parameters do not match type m's expected parameters: +type x (in class FooInvar) is invariant, but type x is declared contravariant object fcoll2inv extends coll2[FooInvar] // error ^ tcpoly_variance_enforce.scala:22: error: kinds of the type arguments (FooString) do not conform to the expected kinds of the type parameters (type m) in trait coll2. -FooString's type parameters do not match type m's expected parameters: type x (in class FooString) is covariant, but type x is declared contravarianttype x (in class FooString)'s bounds >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: Any +FooString's type parameters do not match type m's expected parameters: +type x (in class FooString) is covariant, but type x is declared contravariant +type x (in class FooString)'s bounds <: String are stricter than type x's declared bounds >: Nothing <: Any object fcoll2wb extends coll2[FooString] // error ^ tcpoly_variance_enforce.scala:27: error: kinds of the type arguments (FooString) do not conform to the expected kinds of the type parameters (type m) in trait coll3. -FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: Any +FooString's type parameters do not match type m's expected parameters: +type x (in class FooString)'s bounds <: String are stricter than type x's declared bounds >: Nothing <: Any object fcoll3wb extends coll3[FooString] // error ^ tcpoly_variance_enforce.scala:30: error: kinds of the type arguments (FooString,Int) do not conform to the expected kinds of the type parameters (type m,type y) in trait coll4. -FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: y +FooString's type parameters do not match type m's expected parameters: +type x (in class FooString)'s bounds <: String are stricter than type x's declared bounds <: y object fcoll4_1 extends coll4[FooString, Int] // error ^ tcpoly_variance_enforce.scala:31: error: kinds of the type arguments (FooString,Any) do not conform to the expected kinds of the type parameters (type m,type y) in trait coll4. -FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: y +FooString's type parameters do not match type m's expected parameters: +type x (in class FooString)'s bounds <: String are stricter than type x's declared bounds <: y object fcoll4_2 extends coll4[FooString, Any] // error ^ tcpoly_variance_enforce.scala:37: error: kinds of the type arguments (FooInvar) do not conform to the expected kinds of the type parameters (type m) in trait coll. -FooInvar's type parameters do not match type m's expected parameters: type x (in class FooInvar) is invariant, but type x is declared covariant +FooInvar's type parameters do not match type m's expected parameters: +type x (in class FooInvar) is invariant, but type x is declared covariant def x: coll[FooInvar] = sys.error("foo") // error ^ tcpoly_variance_enforce.scala:38: error: kinds of the type arguments (FooContra) do not conform to the expected kinds of the type parameters (type m) in trait coll. -FooContra's type parameters do not match type m's expected parameters: type x (in class FooContra) is contravariant, but type x is declared covariant +FooContra's type parameters do not match type m's expected parameters: +type x (in class FooContra) is contravariant, but type x is declared covariant def y: coll[FooContra] = sys.error("foo") // error ^ 11 errors found |