From 1111b27d0eb95d69d7507291d242817a2dbe7e64 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Fri, 23 Sep 2011 14:22:13 +0000 Subject: Back to square one. Current design of error trees complicates the design of reflection library, and introduces sometimes unnecessary boilerplate and since I do not want to stall that work I am reverting all the changes related to error trees. A different design is currently under consideration but work will be done on separate branch on github. Revisions that got reverted: r25705, r25704 (partially), r25673, r25669, r25649, r25644, r25621, r25620, r25619 Review by odersky and extempore. --- test/files/neg/patternalts.check | 5 +---- test/files/neg/t1878.check | 11 ++++------- test/files/neg/t2641.check | 30 +++++++++++++++--------------- test/files/neg/t2918.check | 8 ++++---- test/files/neg/t3015.check | 7 ++++++- test/files/neg/t997.check | 8 +------- test/files/neg/volatile.check | 7 +++++-- 7 files changed, 36 insertions(+), 40 deletions(-) (limited to 'test') diff --git a/test/files/neg/patternalts.check b/test/files/neg/patternalts.check index 63bd244345..9bec9a001a 100644 --- a/test/files/neg/patternalts.check +++ b/test/files/neg/patternalts.check @@ -1,7 +1,4 @@ patternalts.scala:3: error: illegal variable in pattern alternative case List(x) | List() => Console.println(x) ^ -patternalts.scala:3: error: not found: value x - case List(x) | List() => Console.println(x) - ^ -two errors found +one error found diff --git a/test/files/neg/t1878.check b/test/files/neg/t1878.check index de59b023ab..4b9cfebde1 100644 --- a/test/files/neg/t1878.check +++ b/test/files/neg/t1878.check @@ -1,18 +1,15 @@ +t1878.scala:3: error: _* may only come last + val err1 = "" match { case Seq(f @ _*, ',') => f } + ^ t1878.scala:3: error: scrutinee is incompatible with pattern type; found : Seq[A] required: java.lang.String val err1 = "" match { case Seq(f @ _*, ',') => f } ^ -t1878.scala:3: error: not found: value f - val err1 = "" match { case Seq(f @ _*, ',') => f } - ^ -t1878.scala:3: error: _* may only come last - val err1 = "" match { case Seq(f @ _*, ',') => f } - ^ t1878.scala:9: error: _* may only come last val List(List(_*, arg2), _) = List(List(1,2,3), List(4,5,6)) ^ t1878.scala:13: error: _* may only come last case

{ _* }

=> ^ -5 errors found +four errors found diff --git a/test/files/neg/t2641.check b/test/files/neg/t2641.check index 595dd46b11..2056a1b9ab 100644 --- a/test/files/neg/t2641.check +++ b/test/files/neg/t2641.check @@ -1,15 +1,24 @@ t2641.scala:18: error: illegal cyclic reference involving trait ManagedSeq with TraversableViewLike[A, ManagedSeqStrict[A], ManagedSeq[A]] ^ +t2641.scala:16: error: illegal inheritance; + self-type ManagedSeq does not conform to ManagedSeqStrict[A]'s selftype ManagedSeqStrict[A] + extends ManagedSeqStrict[A] + ^ +t2641.scala:17: error: illegal inheritance; + self-type ManagedSeq does not conform to scala.collection.TraversableView[A,ManagedSeqStrict[A]]'s selftype scala.collection.TraversableView[A,ManagedSeqStrict[A]] + with TraversableView[A, ManagedSeqStrict[A]] + ^ +t2641.scala:16: error: illegal inheritance; + self-type ManagedSeq does not conform to ScalaObject's selftype ScalaObject + extends ManagedSeqStrict[A] + ^ t2641.scala:24: error: something is wrong (wrong class file?): trait ManagedSeq with type parameters [A,Coll] gets applied to arguments [], phase = typer trait Transformed[+B] extends ManagedSeq[B, Coll] with super.Transformed[B] ^ t2641.scala:26: error: something is wrong (wrong class file?): trait ManagedSeq with type parameters [A,Coll] gets applied to arguments [], phase = namer trait Sliced extends Transformed[A] with super.Sliced { ^ -t2641.scala:27: error: value managedIterator is not a member of ManagedSeq - override def managedIterator = self.managedIterator slice (from, until) - ^ t2641.scala:26: error: illegal inheritance; superclass Any is not a subclass of the superclass ManagedSeqStrict of the mixin trait Transformed @@ -20,16 +29,7 @@ t2641.scala:26: error: illegal inheritance; superclass Any of the mixin trait Sliced trait Sliced extends Transformed[A] with super.Sliced { ^ -t2641.scala:16: error: illegal inheritance; - self-type ManagedSeq does not conform to ManagedSeqStrict[A]'s selftype ManagedSeqStrict[A] - extends ManagedSeqStrict[A] - ^ -t2641.scala:17: error: illegal inheritance; - self-type ManagedSeq does not conform to scala.collection.TraversableView[A,ManagedSeqStrict[A]]'s selftype scala.collection.TraversableView[A,ManagedSeqStrict[A]] - with TraversableView[A, ManagedSeqStrict[A]] - ^ -t2641.scala:16: error: illegal inheritance; - self-type ManagedSeq does not conform to ScalaObject's selftype ScalaObject - extends ManagedSeqStrict[A] - ^ +t2641.scala:27: error: value managedIterator is not a member of ManagedSeq + override def managedIterator = self.managedIterator slice (from, until) + ^ 9 errors found diff --git a/test/files/neg/t2918.check b/test/files/neg/t2918.check index d125895463..e67f24ec57 100644 --- a/test/files/neg/t2918.check +++ b/test/files/neg/t2918.check @@ -1,7 +1,7 @@ -t2918.scala:2: error: A does not take type parameters - def g[X, A[X] <: A[X]](x: A[X]) = x - ^ t2918.scala:2: error: cyclic aliasing or subtyping involving type A - def g[X, A[X] <: A[X]](x: A[X]) = x + def g[X, A[X] <: A[X]](x: A[X]) = x ^ +t2918.scala:2: error: A does not take type parameters + def g[X, A[X] <: A[X]](x: A[X]) = x + ^ two errors found diff --git a/test/files/neg/t3015.check b/test/files/neg/t3015.check index fec54b087b..32809b0669 100644 --- a/test/files/neg/t3015.check +++ b/test/files/neg/t3015.check @@ -3,4 +3,9 @@ t3015.scala:7: error: scrutinee is incompatible with pattern type; required: java.lang.String val b(foo) = "foo" ^ -one error found +t3015.scala:7: error: type mismatch; + found : _$1(in value foo) where type _$1(in value foo) <: java.lang.String + required: (some other)_$1(in value foo) where type (some other)_$1(in value foo) + val b(foo) = "foo" + ^ +two errors found diff --git a/test/files/neg/t997.check b/test/files/neg/t997.check index 166d465971..c9fe0de756 100644 --- a/test/files/neg/t997.check +++ b/test/files/neg/t997.check @@ -10,10 +10,4 @@ t997.scala:13: error: wrong number of arguments for object Foo t997.scala:13: error: not found: value a "x" match { case Foo(a, b, c) => Console.println((a,b,c)) } ^ -t997.scala:13: error: not found: value b -"x" match { case Foo(a, b, c) => Console.println((a,b,c)) } - ^ -t997.scala:13: error: not found: value c -"x" match { case Foo(a, b, c) => Console.println((a,b,c)) } - ^ -6 errors found +four errors found diff --git a/test/files/neg/volatile.check b/test/files/neg/volatile.check index da27c68e6c..b904284125 100644 --- a/test/files/neg/volatile.check +++ b/test/files/neg/volatile.check @@ -1,4 +1,7 @@ -volatile.scala:11: error: Inferred type C.this.D with C.this.E#T contains type selection from volatile type C.this.D with C.this.E#T +volatile.scala:11: error: Inferred type C.this.D with C.this.E#T contains type selection from volatile type C.this.D with C.this.E var sneak = { () => y.x } ^ -one error found +volatile.scala:11: error: Inferred type () => C.this.D with C.this.E#T contains type selection from volatile type C.this.D with C.this.E + var sneak = { () => y.x } + ^ +two errors found -- cgit v1.2.3