Champion "Permit stackalloc in nested expressions" (16.3, Core 3) #1412
Open
3 of 5 tasks
Labels
Implemented Needs ECMA Spec
This feature has been implemented in C#, but still needs to be merged into the ECMA specification
Proposal champion
Proposal
Smallish Feature
Milestone
The Roslyn compilers have the machinery to rewrite expressions so that they occur in non-nested contexts if necessary. We use that mechanism as part of the translation of
await
. We could use it to easily permitstackalloc
in contexts where they are not simply the initializer of a local declaration.The specification would be something like:
Stack allocation
We modify the section Stack allocation of the C# language specification to relax the places when a
stackalloc
expression may appear. We deleteand replace them with one production in which the left-hand-side is primary_no_array_creation_expression and the right-hand-side is the
stackalloc
expression.Other changes to the
stackalloc
expression that occurred in C# 7.3 should be reflected as well.The text was updated successfully, but these errors were encountered: