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
Robin Palotai (literon) said:
If this is the duplicate, which is the main issue? It is still not resolved in 2.9.1-1 (seems fine in 2.10-M2), and I would be very happy to have it right in 2.9.x.
scala> Set(1).fold _
res8: Int => (Int, Int) => Int => Int =
At the first glance, res8 looks like a function that should be called like this: res8(0)((1,2))(3)(4)
To remove ambiguity, this type should be displayed as following:
res8: Int => ((Int, Int) => Int) => Int =
scala> var a: ((Int,Int))=>Int = null
a: (Int, Int) => Int = null
scala> var b: (Int,Int)=>Int = null
b: (Int, Int) => Int = null
scala> val t = (0,0)
t: (Int, Int) = (0,0)
scala> b(t)
:16: error: not enough arguments for method apply: (v1: Int, v2: Int)Int in trait Function2.
scala> a(t)
java.lang.NullPointerException
To remove ambiguity, these types should be displayed as following:
a: ((Int, Int)) => Int = null
b: (Int, Int) => Int = null
The text was updated successfully, but these errors were encountered: