summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/streams.check1
-rw-r--r--test/files/run/streams.scala5
2 files changed, 6 insertions, 0 deletions
diff --git a/test/files/run/streams.check b/test/files/run/streams.check
index 04d92425d9..d11eb7f67a 100644
--- a/test/files/run/streams.check
+++ b/test/files/run/streams.check
@@ -15,3 +15,4 @@ Stream()
Stream(1, 2)
Stream()
+65536
diff --git a/test/files/run/streams.scala b/test/files/run/streams.scala
index cd1185344b..408affe306 100644
--- a/test/files/run/streams.scala
+++ b/test/files/run/streams.scala
@@ -21,4 +21,9 @@ object Test extends Application {
println(s2.drop(-1))
println(s2.dropWhile(_ > 0))
println
+
+ // ticket #153
+ def powers(x: Int) = if ((x&(x-1)) == 0) Some(x) else None
+ val s3 = Stream.range(1, 100000)
+ println(s3.flatMap(powers).reverse.head)
}