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
Allow partial eta expansion using the following rule:
Assume we have an application
(x_1, ..., x_m) => f(<arg_1, ..., arg_n>)
every `x_i` occurs exactly once as argument to `f`, and typing `f` with `(?, ..., ?) => ?`
as expected type (where there are n occurrences of `?` in the argument list)
yields a method type `(T_1, ..., T_n)R`. Let `p` be the mapping from `1..m` to `1..n`
which maps every parameter `x_i` to the position where it occurs in `<arg_1, ..., arg_n>`.
In this case, if one of the parameter types `x_i` is not given and not inferred from the
expected type, assume `T_p(i)` as the type of `x_i`, provided `T_p(i)` is fully defined
and not a repeated type `T*` or `=>T*`.
The reason for excluding repeated types `T*` is that `T*` is not a valid type for a
lambda parameter.
0 commit comments