Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Mar 18, 2025

Looks like this:

image

And:

image

Relates to test plan #76130

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 18, 2025 19:20
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 18, 2025
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 19, 2025 16:34
@dotnet-policy-service dotnet-policy-service bot added the Needs API Review Needs to be reviewed by the API review council label Mar 19, 2025
@dotnet-policy-service
Copy link
Contributor

This PR modifies public API files. Please follow the instructions at https://github.com/dotnet/roslyn/blob/main/docs/contributing/API%20Review%20Process.md for ensuring all public APIs are reviewed before merging.

/// </summary>
public abstract SyntaxNode WithModifiers(SyntaxNode declaration, DeclarationModifiers modifiers);
public SyntaxNode WithModifiers(SyntaxNode declaration, DeclarationModifiers modifiers)
=> WithModifiers<SyntaxNode>(declaration, modifiers);
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 a safe change. it is ok to replace an abstract method with a non-abstract one in a type that isn't publicly derivable. in other words, we own all the derivations and can fix them up. and all callers who are calling this method virtually will continue to work even witha non-virtual method in the same slot as before.

=> WithModifiers<SyntaxNode>(declaration, modifiers);

internal abstract TSyntaxNode WithModifiers<TSyntaxNode>(TSyntaxNode declaration, DeclarationModifiers modifiers)
where TSyntaxNode : SyntaxNode;
Copy link
Member Author

Choose a reason for hiding this comment

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

by having this method, we allow internal callers to be strongly typed, allowing them to have to avoid casting the return type back to the type of hte node they passed in.

@jcouv jcouv added the Feature - Extension Everything The extension everything feature label Mar 20, 2025
@CyrusNajmabadi CyrusNajmabadi merged commit b798cfc into dotnet:features/extensions Mar 20, 2025
25 of 28 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the convertToExtension branch March 20, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Feature - Extension Everything The extension everything feature Needs API Review Needs to be reviewed by the API review council 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.

3 participants