-
Notifications
You must be signed in to change notification settings - Fork 4k
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
IConditionalAccessInstanceExpression API Review #21279
Comments
This seems unnecessary since we can just use |
@mavasani, I want to bring this to discussion today. Some example code: public void M()
{
var o = new object();
o?.ToString();
} This generates the following tree:
The problem with removing this is that the instance receiver, in the bound nodes, is a BoundConditionalReceiver. That node doesn't have information about the actual receiver, in this case the ILocalReferenceExpression. It gets even trickier if you consider something like |
I do think we should add an extension method here though, something like |
Design Decision: |
https://github.com/dotnet/roslyn/blob/features/ioperation/src/Compilers/Core/Portable/Operations/IConditionalAccessInstanceExpression.cs
cc @dotnet/analyzer-ioperation
The text was updated successfully, but these errors were encountered: