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

Recommend init keyword #43865

Merged
merged 3 commits into from
May 3, 2020
Merged

Recommend init keyword #43865

merged 3 commits into from
May 3, 2020

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented May 1, 2020

No description provided.

@jcouv jcouv added the Area-IDE label May 1, 2020
@jcouv jcouv self-assigned this May 1, 2020
@jcouv jcouv marked this pull request as ready for review May 1, 2020 18:18
@jcouv jcouv requested a review from a team as a code owner May 1, 2020 18:18
@jcouv
Copy link
Member Author

jcouv commented May 1, 2020

Tagging @CyrusNajmabadi for small review. Trying to get this in before Monday so it's in the bits Mads demos.

{
return
context.TargetToken.IsAccessorDeclarationContext<PropertyDeclarationSyntax>(position, SyntaxKind.InitKeyword) ||
context.TargetToken.IsAccessorDeclarationContext<IndexerDeclarationSyntax>(position, SyntaxKind.InitKeyword);
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi May 1, 2020

Choose a reason for hiding this comment

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

don't we need:

class C
{
    init 
    {
    }
}

as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we brainstormed that, but that wasn't decided yet.

@@ -138,6 +138,7 @@ private static ImmutableArray<IKeywordRecommender<CSharpSyntaxContext>> GetKeywo
new SealedKeywordRecommender(),
new SelectKeywordRecommender(),
new SetKeywordRecommender(),
new InitKeywordRecommender(),
Copy link
Member

Choose a reason for hiding this comment

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

sort.

@jcouv jcouv closed this May 2, 2020
@jcouv jcouv reopened this May 2, 2020
@jcouv jcouv merged commit a5cd980 into dotnet:features/records May 3, 2020
@jcouv jcouv mentioned this pull request May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants