You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@paulp said:
Sadly this has been inflicted upon me by the compiler, which used to throw errors where I could catch them but now reports them before I get a chance.
% ./build/pack/bin/scala
Welcome to Scala version 2.10.0-20120422-061223-8c95273b70 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_31).
Type in expressions to have them evaluated.
Type :help for more information.
scala> (List(1,2), List("a", "b"), List("c", "d")).zipped.map((x,y,z) => (y,x,z))
res0: List[(String, Int, String)] = List((a,1,c), (b,2,d))
scala> (List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1)
<console>:8: error: wrong number of parameters; expected = 3
(List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1)
^
scala>
The compiler correctly shows the error:
PS: Don't mind the git hash that isn't in trunk yet, I was working on scaladoc.
The text was updated successfully, but these errors were encountered: