diff options
Diffstat (limited to 'tests/untried/pos/t4649.scala')
-rw-r--r-- | tests/untried/pos/t4649.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/untried/pos/t4649.scala b/tests/untried/pos/t4649.scala new file mode 100644 index 000000000..0d6caa8d7 --- /dev/null +++ b/tests/untried/pos/t4649.scala @@ -0,0 +1,6 @@ +object Test { + // @annotation.tailrec + def lazyFilter[E](s: Stream[E], p: E => Boolean): Stream[E] = s match { + case h #:: t => if (p(h)) h #:: lazyFilter(t, p) else lazyFilter(t, p) + } +} |