aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/pos/i1235.scala16
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")
+ }
+}