summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t7294.check6
-rw-r--r--test/files/neg/t7294.flags1
-rw-r--r--test/files/neg/t7294b.check4
-rw-r--r--test/files/neg/t7294b.flags1
-rw-r--r--test/files/pos/t7294.scala6
-rw-r--r--test/files/pos/tcpoly_bounds1.scala6
-rw-r--r--test/files/run/t3888.check1
-rw-r--r--test/files/run/t3888.scala5
8 files changed, 13 insertions, 17 deletions
diff --git a/test/files/neg/t7294.check b/test/files/neg/t7294.check
index f15289c1c0..a308f2457d 100644
--- a/test/files/neg/t7294.check
+++ b/test/files/neg/t7294.check
@@ -1,6 +1,10 @@
t7294.scala:4: warning: fruitless type test: a value of type (Int, Int) cannot also be a Seq[A]
(1, 2) match { case Seq() => 0; case _ => 1 }
^
-error: No warnings can be incurred under -Xfatal-warnings.
+t7294.scala:4: error: pattern type is incompatible with expected type;
+ found : Seq[A]
+ required: (Int, Int)
+ (1, 2) match { case Seq() => 0; case _ => 1 }
+ ^
one warning found
one error found
diff --git a/test/files/neg/t7294.flags b/test/files/neg/t7294.flags
deleted file mode 100644
index 3f3381a45b..0000000000
--- a/test/files/neg/t7294.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfuture -Xfatal-warnings
diff --git a/test/files/neg/t7294b.check b/test/files/neg/t7294b.check
index 707266f0cc..3390cb7278 100644
--- a/test/files/neg/t7294b.check
+++ b/test/files/neg/t7294b.check
@@ -1,6 +1,4 @@
-t7294b.scala:1: warning: inheritance from class Tuple2 in package scala is deprecated (since 2.11.0): Tuples will be made final in a future version.
+t7294b.scala:1: error: illegal inheritance from final class Tuple2
class C extends Tuple2[Int, Int](0, 0)
^
-error: No warnings can be incurred under -Xfatal-warnings.
-one warning found
one error found
diff --git a/test/files/neg/t7294b.flags b/test/files/neg/t7294b.flags
deleted file mode 100644
index d1b831ea87..0000000000
--- a/test/files/neg/t7294b.flags
+++ /dev/null
@@ -1 +0,0 @@
--deprecation -Xfatal-warnings \ No newline at end of file
diff --git a/test/files/pos/t7294.scala b/test/files/pos/t7294.scala
deleted file mode 100644
index ccac2b1400..0000000000
--- a/test/files/pos/t7294.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-object Test {
- // no fruitless warning as Tuple2 isn't (yet) final.
- // The corresponding `neg` test will treat it as final
- // for the purposes of these tests under -Xfuture.
- (1, 2) match { case Seq() => 0; case _ => 1 }
-}
diff --git a/test/files/pos/tcpoly_bounds1.scala b/test/files/pos/tcpoly_bounds1.scala
index 63263cb152..4f52f55cb6 100644
--- a/test/files/pos/tcpoly_bounds1.scala
+++ b/test/files/pos/tcpoly_bounds1.scala
@@ -1,7 +1,9 @@
-class Foo[t[x]<: Tuple2[Int, x]]
+case class T2[+T1, +T2](_1: T1, _2: T2) extends Product2[T1, T2]
+
+class Foo[t[x]<: T2[Int, x]]
//
-class MyPair[z](a: Int, b: z) extends Tuple2[Int, z](a,b)
+class MyPair[z](a: Int, b: z) extends T2[Int, z](a,b)
object foo extends Foo[MyPair]
diff --git a/test/files/run/t3888.check b/test/files/run/t3888.check
index 6fda32d713..e69de29bb2 100644
--- a/test/files/run/t3888.check
+++ b/test/files/run/t3888.check
@@ -1 +0,0 @@
-warning: there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
diff --git a/test/files/run/t3888.scala b/test/files/run/t3888.scala
index 8701b42ff0..b1932ffb20 100644
--- a/test/files/run/t3888.scala
+++ b/test/files/run/t3888.scala
@@ -1,3 +1,4 @@
+case class Tuple2[+T1, +T2](_1: T1, _2: T2) extends Product2[T1, T2]
// in a match, which notion of equals prevails?
// extending Tuple doesn't seem to be at issue here.
@@ -7,13 +8,13 @@ object Test {
private[this] val T2 = T1
def m1 =
- (1, 2) match {
+ Tuple2(1, 2) match {
case T1 => true
case _ => false
}
def m2 =
- (1, 2) match {
+ Tuple2(1, 2) match {
case T2 => true
case _ => false
}