summaryrefslogblamecommitdiff
path: root/test/files/run/repl-parens.check
blob: 79db06f2726679a9e790d532861e6a40635d3248 (plain) (tree)


























                                                                          


















                                                           
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> 

scala> () => 5
res7: () => Int = <function0>

scala> 55 ; () => 5
res8: () => Int = <function0>

scala> () => { class X ; new X }
res9: () => java.lang.Object with ScalaObject = <function0>

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>