diff options
Diffstat (limited to 'test/files/run/t8334.scala')
-rw-r--r-- | test/files/run/t8334.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/t8334.scala b/test/files/run/t8334.scala new file mode 100644 index 0000000000..bc7e97bd04 --- /dev/null +++ b/test/files/run/t8334.scala @@ -0,0 +1,17 @@ +object Test extends App { + def f: Boolean = { + val xs = Nil map (_ => return false) + true + } + + def g: Boolean = { + val xs = Nil collect { case _ => return false } + true + } + + def h: Boolean = { + val xs = Nil flatMap { _ => return false } + true + } + assert(f && g && h) +} |