Skip to content

Trigger completion in 'new()' expression#47383

Merged
sharwell merged 8 commits intodotnet:masterfrom
alrz:ttn-ide
Sep 9, 2020
Merged

Trigger completion in 'new()' expression#47383
sharwell merged 8 commits intodotnet:masterfrom
alrz:ttn-ide

Conversation

@alrz
Copy link
Member

@alrz alrz commented Sep 2, 2020

Fixes #46397
Fixes #47381

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks! (iteration 3)

@jcouv jcouv self-assigned this Sep 2, 2020
@jcouv jcouv added Area-IDE Feature - Target-Typed New `new (args)` gets the created type inferred from context labels Sep 2, 2020
@jcouv jcouv requested a review from CyrusNajmabadi September 2, 2020 20:49
if (type is ITypeParameterSymbol typeParameterSymbol)
{
return Tuple.Create<ITypeSymbol, Location>(typeParameterSymbol.GetNamedTypeSymbolConstraint(), token.GetLocation());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this feels duplicative. i'd prefer we jsut return the type, and have a higher layer say what to do in teh case of a type-parameter. (this applies to the ObjCreation case above as well).

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks! :)

@jinujoseph jinujoseph added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Sep 3, 2020
@alrz
Copy link
Member Author

alrz commented Sep 7, 2020

ping @CyrusNajmabadi

I think this won't make it to 16.8?

@alrz
Copy link
Member Author

alrz commented Sep 7, 2020

@sharwell do you have any other comments?

@CyrusNajmabadi
Copy link
Contributor

CyrusNajmabadi commented Sep 7, 2020

On vacation. Can wait until next week, or if @sharwell can look this week it could go forward.

@alrz alrz requested a review from sharwell September 7, 2020 18:27
Copy link
Member

@genlu genlu left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@sharwell sharwell merged commit 70c2cf3 into dotnet:master Sep 9, 2020
@ghost ghost added this to the Next milestone Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. Feature - Target-Typed New `new (args)` gets the created type inferred from context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Brace completion on target-typed-new introduces a new line Object initializer completion doesn't trigger on target-typed new

7 participants