Skip to content

Conversation

@genlu
Copy link
Member

@genlu genlu commented Apr 3, 2020

Fix #41736

@genlu genlu added the Area-IDE label Apr 3, 2020
@genlu genlu requested a review from a team as a code owner April 3, 2020 00:22
@genlu genlu changed the title show stackallock completion in expression context show stackalloc completion in expression context Apr 3, 2020
return false;
// Beginning with C# 8.0, stackalloc expression can be used inside other expressions
// whenever a Span<T> or ReadOnlySpan<T> variable is allowed.
return (context.IsAnyExpressionContext && !context.IsConstantExpressionContext) ||
Copy link
Member

Choose a reason for hiding this comment

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

mixing && ! || together is tougher to read. there's nothing wrong with statements :)

@genlu
Copy link
Member Author

genlu commented Apr 3, 2020

Thanks @CyrusNajmabadi

@genlu genlu merged commit 5dc0a90 into dotnet:master Apr 3, 2020
@ghost ghost added this to the Next milestone Apr 3, 2020
@genlu genlu deleted the stackallocCompletion branch April 3, 2020 18:49
@sharwell sharwell modified the milestones: Next, temp, 16.6.P3 Apr 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.

stackalloc not shown up in parameter completion list

3 participants