diff options
author | Martin Odersky <odersky@gmail.com> | 2016-04-27 13:58:29 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-04-27 14:01:42 +0200 |
commit | 6c0184b157dd218d4b6f854e7142efdf074e596c (patch) | |
tree | ac2787a75967ab1b3aa661455a83be97a4974a2e /tests/pos | |
parent | 06e76c80f01a54be53391cf74d22f4b6e226c7a0 (diff) | |
download | dotty-6c0184b157dd218d4b6f854e7142efdf074e596c.tar.gz dotty-6c0184b157dd218d4b6f854e7142efdf074e596c.tar.bz2 dotty-6c0184b157dd218d4b6f854e7142efdf074e596c.zip |
Test case
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i1235.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos/i1235.scala b/tests/pos/i1235.scala new file mode 100644 index 000000000..1fbb82ac1 --- /dev/null +++ b/tests/pos/i1235.scala @@ -0,0 +1,16 @@ +case class LazyList[T](headThunk: () => T, tailThunk: () => LazyList[T]){ + lazy val head = headThunk() + lazy val tail = tailThunk() +} + +object ~: { + def unapply[T](x: LazyList[T]) = Some((x.head, x.tail)) +} + +object MinimizedMatchFail { + val ll = LazyList(() => 1, () => LazyList(() => 2, () => ???)) + + ll match { + case lb ~: rest => println("success") + } +} |