summaryrefslogtreecommitdiff
path: root/test/pending/neg/t5589neg.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/neg/t5589neg.scala')
-rw-r--r--test/pending/neg/t5589neg.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/pending/neg/t5589neg.scala b/test/pending/neg/t5589neg.scala
new file mode 100644
index 0000000000..31ff2c3693
--- /dev/null
+++ b/test/pending/neg/t5589neg.scala
@@ -0,0 +1,6 @@
+class A {
+ def f5(x: Either[Int, String]) = for ((y1, y2: String) <- x.right) yield ((y1, y2))
+ def f6(x: Either[Int, String]) = for ((y1, y2: Any) <- x.right) yield ((y1, y2))
+ def f7(x: Either[Int, (String, Int)]) = for (y1 @ Tuple1(y2) <- x.right) yield ((y1, y2))
+ def f8(x: Either[Int, (String, Int)]) = for ((y1, y2, y3) <- x.right) yield ((y1, y2))
+}