summaryrefslogtreecommitdiff
path: root/test/files/run/repl-parens.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-02 00:18:57 +0000
committerPaul Phillips <paulp@improving.org>2011-07-02 00:18:57 +0000
commitf346e54d24847e0529ce1e5ee43e47a038a4961e (patch)
tree7c8ab24d02900eabba77d133a44959a8c764dfad /test/files/run/repl-parens.scala
parent56917143ae6da7a8da532c8b0a45d64b04f6986b (diff)
downloadscala-f346e54d24847e0529ce1e5ee43e47a038a4961e.tar.gz
scala-f346e54d24847e0529ce1e5ee43e47a038a4961e.tar.bz2
scala-f346e54d24847e0529ce1e5ee43e47a038a4961e.zip
Wholesale backport of scala/tools/nsc/interpret...
Wholesale backport of scala/tools/nsc/interpreter with small adjustments to compile against 2.9.0-1. This commit passes all the tests and is mima-verified binary compatible.
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