-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
One feature considered and ultimately not added to C# 6 was declaration expressions. A declaration expression is a new expression of the form
expression:
local-variable-type local-variable-declarator
Such an expression resolves to an lvalue for a fresh local variable that is definitely assigned only if the declarator contains an initializer. In addition, we would support fresh variables for out arguments:
argument-value:
outlocal-variable-type identifier
We need to precisely define the scope of these variables, and perhaps require that they be initialized at the point of declaration.
Reactions are currently unavailable