diff options
Diffstat (limited to 'test/files/pos/virtpatmat_castbinder.scala')
-rw-r--r-- | test/files/pos/virtpatmat_castbinder.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/virtpatmat_castbinder.scala b/test/files/pos/virtpatmat_castbinder.scala new file mode 100644 index 0000000000..be269638ce --- /dev/null +++ b/test/files/pos/virtpatmat_castbinder.scala @@ -0,0 +1,15 @@ +class IntMap[+V] +case class Bin[+T](m: IntMap[T]) extends IntMap[T] +case class Tip[+T](x: T) extends IntMap[T] + +trait IntMapIterator[V, T] { + def valueOf(tip: Tip[V]): T + def pop: IntMap[V] + + def next: T = + pop match { + case Bin(t@Tip(_)) => { + valueOf(t) + } + } +}
\ No newline at end of file |