Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for presence of inapplicable extension methods of the same viability when binding arguments for error recovery in presence of single instance method candidate. #7740

Merged
merged 1 commit into from
Jan 6, 2016

Conversation

AlekseyTs
Copy link
Contributor

Fixes #5128.

@dotnet/roslyn-compiler Please review.

@AlekseyTs
Copy link
Contributor Author

Test prtest/win/dbg/unit32 please

@gafter
Copy link
Member

gafter commented Dec 31, 2015

LGTM.

The added complexity to the internal APIs is unfortunate, but I don't see a better way.

@@ -676,6 +678,7 @@ private static void CheckRestrictedTypeReceiver(BoundExpression expression, Comp
/// <param name="methodGroup">Method group if the invocation represents a potentially overloaded member.</param>
/// <param name="delegateTypeOpt">Delegate type if method group represents a delegate.</param>
/// <param name="diagnostics">Diagnostics.</param>
/// <param name="extensionMethodsOfSameViabilityAreAvailable"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description?

…ability when binding arguments for error recovery in presence of single instance method candidate.

Fixes dotnet#5128.
@AlekseyTs
Copy link
Contributor Author

@jaredpar Comments were added/adjusted per your feedback.

@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler Please review, need a second sign off.

@VSadov
Copy link
Member

VSadov commented Jan 6, 2016

LGTM

AlekseyTs added a commit that referenced this pull request Jan 6, 2016
Account for presence of inapplicable extension methods of the same viability when binding arguments for error recovery in presence of single instance method candidate.
@AlekseyTs AlekseyTs merged commit ac49fc4 into dotnet:master Jan 6, 2016
gafter added a commit to gafter/roslyn that referenced this pull request Jun 20, 2016
thereby reducing coupling between internal compiler APIs.
See also dotnet#7740 dotnet#5128, where the vestigal APIs were introduced.
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).
gafter added a commit that referenced this pull request Jun 22, 2016
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants