summaryrefslogtreecommitdiff
path: root/test/files/run/repl-parens.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/repl-parens.scala')
-rw-r--r--test/files/run/repl-parens.scala26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/repl-parens.scala b/test/files/run/repl-parens.scala
new file mode 100644
index 0000000000..081db3606a
--- /dev/null
+++ b/test/files/run/repl-parens.scala
@@ -0,0 +1,26 @@
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ def code = """
+(2)
+(2 + 2)
+((2 + 2))
+ ((2 + 2))
+ ( (2 + 2))
+ ( (2 + 2 ) )
+5 ; ( (2 + 2 ) ) ; ((5))
+(((2 + 2)), ((2 + 2)))
+(((2 + 2)), ((2 + 2)), 2)
+((((2 + 2)), ((2 + 2)), 2).productIterator ++ Iterator(3) mkString)
+
+55 ; ((2 + 2)) ; (1, 2, 3)
+
+() => 5
+55 ; () => 5
+() => { class X ; new X }
+
+def foo(x: Int)(y: Int)(z: Int) = x+y+z
+foo(5)(10)(15)+foo(5)(10)(15)
+
+ """.trim
+} \ No newline at end of file