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

Inline Hints - Checks if names are equivalent in member access expression #76254

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

akhera99
Copy link
Member

@akhera99 akhera99 commented Dec 4, 2024

Fixes: #69793

@akhera99 akhera99 requested a review from a team as a code owner December 4, 2024 00:44
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 4, 2024
Comment on lines 284 to 296
var identifierNameSyntax =
syntaxFacts.IsArgument(argument) ? syntaxFacts.GetExpressionOfArgument(argument) :
syntaxFacts.IsAttributeArgument(argument) ? syntaxFacts.GetExpressionOfAttributeArgument(argument) : null;

if (syntaxFacts.IsMemberAccessExpression(identifierNameSyntax))
{
identifierNameSyntax = syntaxFacts.GetNameOfMemberAccessExpression(identifierNameSyntax);
}

if (!syntaxFacts.IsIdentifierName(identifierNameSyntax))
return string.Empty;

var identifier = syntaxFacts.GetIdentifierOfIdentifierName(identifierNameSyntax);
Copy link
Member

Choose a reason for hiding this comment

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

I believe there is a TrGetInferredMemberName you could potentially use. Up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameter name InlineHints should ignore this. and base.
3 participants