From a116937649f5a071f7030214f8aa1fafb430fee5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 31 Jan 2007 16:29:59 +0000 Subject: fixed Console.printf --- test/files/pos/bug927.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/pos/bug927.scala (limited to 'test') 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) + +} -- cgit v1.2.3