-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Don't show builder after dot #15564
Don't show builder after dot #15564
Conversation
// In the following situation, the type inferrer will infer Task to support target type preselection | ||
// Action a = Task.$$ | ||
// We need to explicitly exclude invocation/member access from suggestion mode | ||
var previousToken = token.GetPreviousTokenIfTouchingWord(position); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd much rather have the syntax check up front. Asking if we're in a locatoin where you could have an inferred lambda.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks. This actually looks way better.
Fixes #15443 |
retest windows_debug_unit32_prtest please |
// We need to explicitly exclude invocation/member access from suggestion mode | ||
var previousToken = token.GetPreviousTokenIfTouchingWord(position); | ||
if (previousToken.IsKind(SyntaxKind.DotToken) && | ||
previousToken.Parent.IsKind(SyntaxKind.InvocationExpression, SyntaxKind.SimpleMemberAccessExpression)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dot token can't be parented by an invocation expression.
Tag @dotnet/roslyn-ide for review