diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-31 07:37:01 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-31 07:37:01 -0800 |
commit | 42c4cc7a1eed222a1593c6ac2652cd5357c2897a (patch) | |
tree | fce2af644c22a08e35ca40c2d6b2a0dc7d29559d /test/files/pos | |
parent | ba72ee7c6f556827a1e8100d9193f0452c5313a1 (diff) | |
parent | a87d40960bfdb4a683c05d3430a8874cb4dcff36 (diff) | |
download | scala-42c4cc7a1eed222a1593c6ac2652cd5357c2897a.tar.gz scala-42c4cc7a1eed222a1593c6ac2652cd5357c2897a.tar.bz2 scala-42c4cc7a1eed222a1593c6ac2652cd5357c2897a.zip |
Merge pull request #1989 from adriaanm/rework-pr-1945
SI-6968 Simple Tuple patterns aren't irrefutable
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t1336.scala | 10 | ||||
-rw-r--r-- | test/files/pos/t5589.scala | 22 |
2 files changed, 0 insertions, 32 deletions
diff --git a/test/files/pos/t1336.scala b/test/files/pos/t1336.scala deleted file mode 100644 index 63967985c7..0000000000 --- a/test/files/pos/t1336.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Foo { - def foreach( f : ((Int,Int)) => Unit ) { - println("foreach") - f(1,2) - } - - for( (a,b) <- this ) { - println((a,b)) - } -} diff --git a/test/files/pos/t5589.scala b/test/files/pos/t5589.scala deleted file mode 100644 index 69cbb20391..0000000000 --- a/test/files/pos/t5589.scala +++ /dev/null @@ -1,22 +0,0 @@ -class A { - // First three compile. - def f1(x: Either[Int, String]) = x.right map (y => y) - def f2(x: Either[Int, String]) = for (y <- x.right) yield y - def f3(x: Either[Int, (String, Int)]) = x.right map { case (y1, y2) => (y1, y2) } - // Last one fails. - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) -/** -./a.scala:5: error: constructor cannot be instantiated to expected type; - found : (T1, T2) - required: Either[Nothing,(String, Int)] - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) - ^ -./a.scala:5: error: not found: value y1 - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) - ^ -./a.scala:5: error: not found: value y2 - def f4(x: Either[Int, (String, Int)]) = for ((y1, y2) <- x.right) yield ((y1, y2)) - ^ -three errors found -**/ -} |