Improve lambda type inference for erroneous method groups
We attempt to bind lambda args against every applicable delegate type that could be a matching parameter, and then select the "best" for error recovery. This also has the effect of removing unbound lambdas from the bound trees, replacing them with the "best" binding for error recovery. This makes the semantic model insensitive to any further trial bindings (i.e. mutation of the unbound lambda cache). Fixes #12063, #11979, #11901 Remove vestigal "extensionMethodsOfSameViabilityAreAvailable" thereby reducing coupling between internal compiler APIs. See also #7740 #5128, where the vestigal APIs were introduced.
Showing
想要评论请 注册 或 登录