aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t153.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/t153.scala')
-rw-r--r--tests/run/t153.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/run/t153.scala b/tests/run/t153.scala
new file mode 100644
index 000000000..610a9d6df
--- /dev/null
+++ b/tests/run/t153.scala
@@ -0,0 +1,5 @@
+object Test extends dotty.runtime.LegacyApp {
+ def powers(x: Int) = if ((x&(x-1))==0) Some(x) else None
+ val res = (Stream.range(1, 500000) flatMap powers).reverse
+ println((res take 42).force)
+}