From 92a2fd5397e1c6f67677e96bbf427ab256ec37f9 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 1 Jun 2011 18:34:20 +0000 Subject: More adjustments to repl parsing to accomodate ... More adjustments to repl parsing to accomodate inaccurately positioned parse trees. No review. --- test/files/run/repl-parens.check | 19 +++++++++++++++++++ test/files/run/repl-parens.scala | 8 ++++++++ 2 files changed, 27 insertions(+) (limited to 'test') diff --git a/test/files/run/repl-parens.check b/test/files/run/repl-parens.check index eeb21c67d0..79db06f272 100644 --- a/test/files/run/repl-parens.check +++ b/test/files/run/repl-parens.check @@ -25,3 +25,22 @@ scala> 55 ; ((2 + 2)) ; (1, 2, 3) res6: (Int, Int, Int) = (1,2,3) scala> + +scala> () => 5 +res7: () => Int = + +scala> 55 ; () => 5 +res8: () => Int = + +scala> () => { class X ; new X } +res9: () => java.lang.Object with ScalaObject = + +scala> + +scala> def foo(x: Int)(y: Int)(z: Int) = x+y+z +foo: (x: Int)(y: Int)(z: Int)Int + +scala> foo(5)(10)(15)+foo(5)(10)(15) +res10: Int = 60 + +scala> diff --git a/test/files/run/repl-parens.scala b/test/files/run/repl-parens.scala index cdfe53efe7..3b2740837c 100644 --- a/test/files/run/repl-parens.scala +++ b/test/files/run/repl-parens.scala @@ -10,5 +10,13 @@ object Test extends ReplTest { ((((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 -- cgit v1.2.3