Skip to content

Recommend init keyword#43865

Merged
jcouv merged 3 commits intodotnet:features/recordsfrom
jcouv:init-only2
May 3, 2020
Merged

Recommend init keyword#43865
jcouv merged 3 commits intodotnet:features/recordsfrom
jcouv:init-only2

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
Contributor

@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.

new SealedKeywordRecommender(),
new SelectKeywordRecommender(),
new SetKeywordRecommender(),
new InitKeywordRecommender(),
Copy link
Contributor

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