diff options
author | Martin Odersky <odersky@gmail.com> | 2007-01-31 16:29:59 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-01-31 16:29:59 +0000 |
commit | a116937649f5a071f7030214f8aa1fafb430fee5 (patch) | |
tree | d4f7a1bc2a0c1fb26c99c46ca0699b364a63719c /test/files | |
parent | 485a79aa79142c2740a64f8e7a83036067c7ee9c (diff) | |
download | scala-a116937649f5a071f7030214f8aa1fafb430fee5.tar.gz scala-a116937649f5a071f7030214f8aa1fafb430fee5.tar.bz2 scala-a116937649f5a071f7030214f8aa1fafb430fee5.zip |
fixed Console.printf
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/bug927.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/bug927.scala b/test/files/pos/bug927.scala new file mode 100644 index 0000000000..6ab932e23b --- /dev/null +++ b/test/files/pos/bug927.scala @@ -0,0 +1,11 @@ +object Test { + + def sum(stream: Stream[int]): int = + stream match { + case Stream.empty => 0 + case Stream.cons(hd, tl) => hd + sum(tl) + } + val str: Stream[int] = Stream.fromIterator(List(1,2,3).elements) + assert(sum(str) == 6) + +} |