Remove redundant parameter type checks during closure checking
Summary:
When checking lambdas and anonymous functions, we perform some redundant checking of explicit type hints against the type that has been constructed for the parameter (e.g. from the expected type). It seems that this code is a hangover from when (years ago) we checked lambda definitions against their application sites.
New test for Sound Dynamic, which was rejected (wrongly) prior to this diff.
It looks like there is a bunch more cleanup we can do for lambdas and lambda parameters, which I will leave for future diffs.
Reviewed By: vassilmladenov
Differential Revision:
D39130178
fbshipit-source-id:
818defcb5ea783af2b9f493057d917a008d6eedb