summaryrefslogtreecommitdiff
path: root/test/pending/pos/treecheckers/c4.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/pos/treecheckers/c4.scala')
-rw-r--r--test/pending/pos/treecheckers/c4.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/pending/pos/treecheckers/c4.scala b/test/pending/pos/treecheckers/c4.scala
new file mode 100644
index 0000000000..2328131770
--- /dev/null
+++ b/test/pending/pos/treecheckers/c4.scala
@@ -0,0 +1,9 @@
+sealed trait Message[+A]
+class Script[A] extends Message[A] {
+ def iterator: Iterator[Message[A]] = ???
+}
+
+trait Test4[A] {
+ def f(cmd: Message[A]): Iterator[A] = cmd match { case s: Script[t] => s.iterator flatMap f }
+ def g(cmd: Message[A]) = cmd match { case s: Script[t] => s }
+}