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
Summary:
This patch adds a special case in the signature selection to infer the return type of lambda functions when used as a parameter of a function call. It infers the lambda parameter type using existing type constraints from other parameters and adds an implicit type annotation on the lambda parameter in order to infer its return type.
The typical use case is `map(lambda x: ..., y)`. Using the type of `y`, we can infer the type of `x` and thus infer the return type of the lambda and the return type of the `map` call.
Reviewed By: mrkmndz
Differential Revision: D20430157
fbshipit-source-id: 407d1bc850869348d1c8c680c546618585bce2b1