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

SymbolInfo for bad property in a property pattern should contain candidate symbols #9284

Closed
gafter opened this issue Feb 28, 2016 · 5 comments
Assignees
Labels
Area-Compilers Bug Feature - Pattern Matching Pattern Matching Language-C# Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@gafter
Copy link
Member

gafter commented Feb 28, 2016

The SymbolInfo returned when there is a bad property in a property pattern (e.g. because it is ambiguous, inaccessible, static, etc) should contain any properties that are (improperly) referenced.

See, for example, the test AmbiguousNamedProperty in PatternMatchingTests.

@gafter gafter added this to the 2.0 (RC) milestone Feb 28, 2016
@gafter
Copy link
Member Author

gafter commented Feb 28, 2016

/cc @AlekseyTs

@AlekseyTs
Copy link
Contributor

The diagnostic should also be adjusted to better reflect the reason for the failure.
We should consider reusing the code that is used to bind members in object member initializers, I think it makes sure the errors are accurate and all appropriate information is available to SemanticModel.

@jaredpar jaredpar added the Bug label Mar 4, 2016
gafter added a commit to gafter/roslyn that referenced this issue Mar 4, 2016
@gafter gafter added the 4 - In Review A fix for the issue is submitted for review. label Apr 12, 2016
@gafter gafter self-assigned this Apr 12, 2016
gafter added a commit to gafter/roslyn that referenced this issue Apr 12, 2016
Fix check for cross-assembly pattern-matching operators.
Fixes dotnet#10459 dotnet#10364
Closes dotnet#8778 dotnet#9284
@gafter
Copy link
Member Author

gafter commented Apr 16, 2016

Fixed in the features/patterns branch by #10590

@gafter gafter closed this as completed Apr 16, 2016
@gafter gafter added Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented and removed 4 - In Review A fix for the issue is submitted for review. labels Apr 16, 2016
@gafter gafter removed their assignment Apr 16, 2016
@AlekseyTs
Copy link
Contributor

@gafter I am not sure how this issue was fixed in #10590. It doesn't look like new test for this specific scenario were added. Note that

The diagnostic should also be adjusted to better reflect the reason for the failure.

is also part of this issue.

@gafter
Copy link
Member Author

gafter commented Jun 5, 2018

Fixed and tested in #27160

@gafter gafter closed this as completed Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Feature - Pattern Matching Pattern Matching Language-C# Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

3 participants