diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-11-22 03:12:36 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-11-22 03:12:36 -0800 |
commit | 666f39d3493ee633a616c40f1c41add1190a3a40 (patch) | |
tree | a62015e39bfdd6235bdcf0bef31fc31342ea60b6 /test/files/neg | |
parent | 42657a6918ef7d6fd3f36838739ec8a3b64744a3 (diff) | |
parent | b004c3ddb38f8e690a0895a51ad0c83ff57a01e7 (diff) | |
download | scala-666f39d3493ee633a616c40f1c41add1190a3a40.tar.gz scala-666f39d3493ee633a616c40f1c41add1190a3a40.tar.bz2 scala-666f39d3493ee633a616c40f1c41add1190a3a40.zip |
Merge pull request #3131 from densh/pr/deprecate-pair-and-triple
Deprecate Pair and Triple
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/patmatexhaust.scala | 4 | ||||
-rw-r--r-- | test/files/neg/t414.scala | 2 | ||||
-rw-r--r-- | test/files/neg/t5702-neg-bad-and-wild.check | 2 | ||||
-rw-r--r-- | test/files/neg/t5702-neg-bad-and-wild.scala | 2 | ||||
-rw-r--r-- | test/files/neg/t997.scala | 2 | ||||
-rw-r--r-- | test/files/neg/wellkinded_wrongarity.check | 4 | ||||
-rw-r--r-- | test/files/neg/wellkinded_wrongarity.scala | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/test/files/neg/patmatexhaust.scala b/test/files/neg/patmatexhaust.scala index aa7dac7d7d..f937197829 100644 --- a/test/files/neg/patmatexhaust.scala +++ b/test/files/neg/patmatexhaust.scala @@ -22,9 +22,9 @@ class TestSealedExhaustive { // compile only def ma3(x:Mult) = (x,x) match { // not exhaustive case (Kult(_), Qult()) => // Kult missing - //case Pair(Kult(_), Kult(_)) => + //case (Kult(_), Kult(_)) => case (Qult(), Kult(_)) => // Qult missing - //case Pair(Qult(), Qult()) => + //case (Qult(), Qult()) => } def ma3u(x:Mult) = ((x,x) : @unchecked) match { // not exhaustive, but not checked! diff --git a/test/files/neg/t414.scala b/test/files/neg/t414.scala index 1662b9a105..86646d13c2 100644 --- a/test/files/neg/t414.scala +++ b/test/files/neg/t414.scala @@ -1,5 +1,5 @@ case class Empty[a]() extends IntMap[a]; -case class Node[a](left: IntMap[a], keyVal: Pair[Int, a], right: IntMap[a]) extends IntMap[a]; +case class Node[a](left: IntMap[a], keyVal: Tuple2[Int, a], right: IntMap[a]) extends IntMap[a]; abstract class IntMap[a] { def lookup(key: Int): a = this match { case Empty => diff --git a/test/files/neg/t5702-neg-bad-and-wild.check b/test/files/neg/t5702-neg-bad-and-wild.check index ff9e5e5703..a52136dbf8 100644 --- a/test/files/neg/t5702-neg-bad-and-wild.check +++ b/test/files/neg/t5702-neg-bad-and-wild.check @@ -23,6 +23,6 @@ t5702-neg-bad-and-wild.scala:23: error: bad simple pattern: bad use of _* (a seq val K(ns @ _*, x) = k // bad use of _* (a sequence pattern must be the last pattern) ^ t5702-neg-bad-and-wild.scala:24: error: bad simple pattern: bad use of _* (sequence pattern not allowed) - val (b, _ * ) = Pair(5,6) // bad use of _* (sequence pattern not allowed) + val (b, _ * ) = (5,6) // bad use of _* (sequence pattern not allowed) ^ 9 errors found diff --git a/test/files/neg/t5702-neg-bad-and-wild.scala b/test/files/neg/t5702-neg-bad-and-wild.scala index 3833a002b1..aadda37da7 100644 --- a/test/files/neg/t5702-neg-bad-and-wild.scala +++ b/test/files/neg/t5702-neg-bad-and-wild.scala @@ -21,7 +21,7 @@ object Test { //gowild.scala:14: error: star patterns must correspond with varargs parameters val K(is @ _*) = k val K(ns @ _*, x) = k // bad use of _* (a sequence pattern must be the last pattern) - val (b, _ * ) = Pair(5,6) // bad use of _* (sequence pattern not allowed) + val (b, _ * ) = (5,6) // bad use of _* (sequence pattern not allowed) // no longer complains //bad-and-wild.scala:15: error: ')' expected but '}' found. } diff --git a/test/files/neg/t997.scala b/test/files/neg/t997.scala index e8d10f4317..1198738f24 100644 --- a/test/files/neg/t997.scala +++ b/test/files/neg/t997.scala @@ -1,5 +1,5 @@ // An extractor with 2 results -object Foo { def unapply(x : String) = Some(Pair(x, x)) } +object Foo { def unapply(x : String) = Some((x, x)) } object Test extends App { diff --git a/test/files/neg/wellkinded_wrongarity.check b/test/files/neg/wellkinded_wrongarity.check index 1dc38db5c1..b9f033b453 100644 --- a/test/files/neg/wellkinded_wrongarity.check +++ b/test/files/neg/wellkinded_wrongarity.check @@ -1,4 +1,4 @@ -wellkinded_wrongarity.scala:5: error: Pair takes two type parameters, expected: one -object mp extends Monad[Pair] +wellkinded_wrongarity.scala:5: error: Tuple2 takes two type parameters, expected: one +object mp extends Monad[Tuple2] ^ one error found diff --git a/test/files/neg/wellkinded_wrongarity.scala b/test/files/neg/wellkinded_wrongarity.scala index 2bb0e2ce8a..39c7601d53 100644 --- a/test/files/neg/wellkinded_wrongarity.scala +++ b/test/files/neg/wellkinded_wrongarity.scala @@ -2,4 +2,4 @@ class Monad[m[x]] -object mp extends Monad[Pair] +object mp extends Monad[Tuple2] |