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
We probably should treat this as an implicit function type, otherwise distributing an intersection (something that the compiler will do in some situations) would change the semantics. But then should we allow this too ?
It can't be final since implicit function literals are desugared to anonymous subclasses of ImplicitFunctionN, at best we could disallow non-anonymous subclasses of it ?
I think the answer is: intersections are not function types whether implicit or not. So far I have not seen that distributing an intersection will cause problems. Let's re-open if there is a case. In that case we shyould probably restrict the distribution itself to avoid a change in semantics.
E.g.:
We probably should treat this as an implicit function type, otherwise distributing an intersection (something that the compiler will do in some situations) would change the semantics. But then should we allow this too ?
@odersky WDYT ?
The text was updated successfully, but these errors were encountered: