summaryrefslogtreecommitdiff
path: root/test/files/run/repl-parens.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-31 19:50:08 +0000
committerPaul Phillips <paulp@improving.org>2011-05-31 19:50:08 +0000
commit46c81507437d3202826e2ab53f328b241a6c9387 (patch)
treec22cf225158c68206537ea2d12cb72cc9670d519 /test/files/run/repl-parens.check
parented87ab5299ed3e19481ad14b1ab18d676c7c4a91 (diff)
downloadscala-46c81507437d3202826e2ab53f328b241a6c9387.tar.gz
scala-46c81507437d3202826e2ab53f328b241a6c9387.tar.bz2
scala-46c81507437d3202826e2ab53f328b241a6c9387.zip
Fixed a repl regression with parentheses handli...
Fixed a repl regression with parentheses handling, reminding me we really need that honest parser phase which doesn't betray us with parentheses abandonment and dramatic desugarings. I'll promote it from page 14 to page 11. Closes #4661, no review.
Diffstat (limited to 'test/files/run/repl-parens.check')
-rw-r--r--test/files/run/repl-parens.check27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/files/run/repl-parens.check b/test/files/run/repl-parens.check
new file mode 100644
index 0000000000..eeb21c67d0
--- /dev/null
+++ b/test/files/run/repl-parens.check
@@ -0,0 +1,27 @@
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala> (2)
+res0: Int = 2
+
+scala> (2 + 2)
+res1: Int = 4
+
+scala> ((2 + 2))
+res2: Int = 4
+
+scala> (((2 + 2)), ((2 + 2)))
+res3: (Int, Int) = (4,4)
+
+scala> (((2 + 2)), ((2 + 2)), 2)
+res4: (Int, Int, Int) = (4,4,2)
+
+scala> ((((2 + 2)), ((2 + 2)), 2).productIterator ++ Iterator(3) mkString)
+res5: String = 4423
+
+scala>
+
+scala> 55 ; ((2 + 2)) ; (1, 2, 3)
+res6: (Int, Int, Int) = (1,2,3)
+
+scala>