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

Update 'implement interface' to forward explicit members to implicit ones #76044

Merged

Conversation

CyrusNajmabadi
Copy link
Member

Fixes #67023

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner November 22, 2024 23:49
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 22, 2024
{
get
{
return Current;
Copy link
Contributor

Choose a reason for hiding this comment

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

return Current;

Is this desired? The boxing might not be necessary depending on how the Current method is implemented.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is "fine". it's the legacy apis calling to the modern ones.

@@ -209,12 +213,27 @@ public static ImmutableArray<SyntaxNode> GetGetAccessorStatements(
return [generator.ReturnStatement(expression)];
}

return preferAutoProperties ? default : generator.CreateThrowNotImplementedStatementBlock(compilation);
if (preferAutoProperties)
Copy link
Contributor

Choose a reason for hiding this comment

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

if (preferAutoProperties)

we don't want to do this for auto-properties when there are conflicting properties too?

Copy link
Member Author

Choose a reason for hiding this comment

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

honestly. i'm really trying to hit the sweet spot here.

@ToddGrun
Copy link
Contributor

            return [generator.ExpressionStatement(generator.AssignmentStatement(generator.MemberAccessExpression(generator.ThisExpression(), property.Name), generator.IdentifierName("value")))];

Not from this PR, but should the "value" string be changed on line 252 too?


Refers to: src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Extensions/SyntaxGeneratorExtensions.cs:265 in 0052955. [](commit_id = 0052955, deletion_comment = True)

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

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

:shipit:

@CyrusNajmabadi
Copy link
Member Author

Not from this PR, but should the "value" string be changed on line 252 too?

Caring level is low. I'm focusing on issues peoplee report.

@CyrusNajmabadi CyrusNajmabadi merged commit 6fa1a3b into dotnet:main Nov 26, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 26, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the implementInterfaceForwarding branch November 26, 2024 03:37
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.

Make fixer for CS0535 smarter when implementing IEnumerable<T>
2 participants