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
@retronym said:
The point in the current implementation that checks this:
case mt1 @MethodType(params1, res1) =>
tp2 match {
case mt2 @MethodType(params2, res2) =>// sameLength(params1, params2) was used directly as pre-screening optimization (now done by matchesQuantified -- is that ok, performancewise?)
mt1.isImplicit == mt2.isImplicit &&
matchingParams(params1, params2, mt1.isJava, mt2.isJava) &&
matchesQuantified(params1, params2, res1, res2)
Two method types(§3.3.1) are equivalent if they have equivalent resulttypes, both have the same number of parameters, and corresponding parameters have equivalent types. Note that the names of parameters do not matter for method type equivalence.
Assigning to Martin for clarification; it seems to me like it's intentional and the spec needs an update.
@paulp said:
It's definitely intentional. "The spec needs an update" is a non-sequitur at this point. Yes, the spec needs an update, and I need a flying car.
If I try to compile the following code:
I get error:
Same with class:
The text was updated successfully, but these errors were encountered: