summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2012-10-02 09:03:00 -0700
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2012-10-02 09:03:00 -0700
commit5dae38df7d8929a4666c9263cc78579bed972ac2 (patch)
tree4abc99a579fe9977950ef3ed8d7bc84d3cb971a3 /test/files/neg
parente93ca3231798241baf0f48ad361c0aa9668ee871 (diff)
parent81226b82d8c8b138eabb6956cab82410a17d812c (diff)
downloadscala-5dae38df7d8929a4666c9263cc78579bed972ac2.tar.gz
scala-5dae38df7d8929a4666c9263cc78579bed972ac2.tar.bz2
scala-5dae38df7d8929a4666c9263cc78579bed972ac2.zip
Merge pull request #1437 from paulp/typevar-suspension
Typevar suspension
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/gadts1.check7
-rw-r--r--test/files/neg/patmat-type-check.check17
-rw-r--r--test/files/neg/t3015.check5
-rw-r--r--test/files/neg/unchecked-impossible.check6
4 files changed, 26 insertions, 9 deletions
diff --git a/test/files/neg/gadts1.check b/test/files/neg/gadts1.check
index 44d2b114d6..a61231a27a 100644
--- a/test/files/neg/gadts1.check
+++ b/test/files/neg/gadts1.check
@@ -1,8 +1,3 @@
-gadts1.scala:15: error: type mismatch;
- found : Test.Double
- required: a
- case NumTerm(n) => c.x = Double(1.0)
- ^
gadts1.scala:20: error: class Cell of type Test.Cell does not take type parameters.
case Cell[a](x: Int) => c.x = 5
^
@@ -11,4 +6,4 @@ gadts1.scala:20: error: type mismatch;
required: a
case Cell[a](x: Int) => c.x = 5
^
-three errors found
+two errors found
diff --git a/test/files/neg/patmat-type-check.check b/test/files/neg/patmat-type-check.check
index 721217c314..fedac3b746 100644
--- a/test/files/neg/patmat-type-check.check
+++ b/test/files/neg/patmat-type-check.check
@@ -1,12 +1,27 @@
patmat-type-check.scala:11: warning: fruitless type test: a value of type Test.Bop4[T] cannot also be a Seq[A]
def s3[T](x: Bop4[T]) = x match { case Seq('b', 'o', 'b') => true }
^
+patmat-type-check.scala:11: error: pattern type is incompatible with expected type;
+ found : Seq[A]
+ required: Test.Bop4[T]
+ def s3[T](x: Bop4[T]) = x match { case Seq('b', 'o', 'b') => true }
+ ^
patmat-type-check.scala:15: warning: fruitless type test: a value of type Test.Bop5[_$1,T1,T2] cannot also be a Seq[A]
def s4[T1, T2](x: Bop5[_, T1, T2]) = x match { case Seq('b', 'o', 'b') => true }
^
+patmat-type-check.scala:15: error: pattern type is incompatible with expected type;
+ found : Seq[A]
+ required: Test.Bop5[_$1,T1,T2] where type _$1
+ def s4[T1, T2](x: Bop5[_, T1, T2]) = x match { case Seq('b', 'o', 'b') => true }
+ ^
patmat-type-check.scala:19: warning: fruitless type test: a value of type Test.Bop3[T] cannot also be a Seq[A]
def f4[T](x: Bop3[T]) = x match { case Seq('b', 'o', 'b') => true }
^
+patmat-type-check.scala:19: error: pattern type is incompatible with expected type;
+ found : Seq[A]
+ required: Test.Bop3[T]
+ def f4[T](x: Bop3[T]) = x match { case Seq('b', 'o', 'b') => true }
+ ^
patmat-type-check.scala:22: error: scrutinee is incompatible with pattern type;
found : Seq[A]
required: String
@@ -28,4 +43,4 @@ patmat-type-check.scala:30: error: scrutinee is incompatible with pattern type;
def f4[T](x: Bop3[Char]) = x match { case Seq('b', 'o', 'b') => true } // fail
^
three warnings found
-four errors found
+7 errors found
diff --git a/test/files/neg/t3015.check b/test/files/neg/t3015.check
index 6948392bb0..4a03c940f4 100644
--- a/test/files/neg/t3015.check
+++ b/test/files/neg/t3015.check
@@ -3,4 +3,7 @@ t3015.scala:7: error: scrutinee is incompatible with pattern type;
required: String
val b(foo) = "foo"
^
-one error found
+error: type mismatch;
+ found : _$1
+ required: String
+two errors found
diff --git a/test/files/neg/unchecked-impossible.check b/test/files/neg/unchecked-impossible.check
index 75fc390fa8..d150a5a853 100644
--- a/test/files/neg/unchecked-impossible.check
+++ b/test/files/neg/unchecked-impossible.check
@@ -1,6 +1,10 @@
unchecked-impossible.scala:5: warning: fruitless type test: a value of type T2[Int,Int] cannot also be a Seq[A]
case Seq(x) =>
^
-error: No warnings can be incurred under -Xfatal-warnings.
+unchecked-impossible.scala:5: error: pattern type is incompatible with expected type;
+ found : Seq[A]
+ required: T2[Int,Int]
+ case Seq(x) =>
+ ^
one warning found
one error found