aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t1996.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/t1996.scala')
-rw-r--r--tests/pos/t1996.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/pos/t1996.scala b/tests/pos/t1996.scala
new file mode 100644
index 000000000..273012819
--- /dev/null
+++ b/tests/pos/t1996.scala
@@ -0,0 +1,19 @@
+object forbug {
+ val l1 = List(List(ValDef(new A)), List(ValDef(new A)))
+ for ((e1s, e2s) <- l1.zip(l1);
+ (e1, e2) <- e1s.zip(e2s)) {
+ e1.a.doSome(20)
+// ()
+ }
+}
+
+
+class A {
+ def doSome(a: Int): this.type = {
+ println(a)
+ this
+ }
+}
+
+case class ValDef(a: A)
+