"Out Variable Declaration" work items and open design issues #11566
Labels
Area-Compilers
Feature - Out Variable Declaration
Out Variable Declaration
Language-C#
Test
Test failures in roslyn-CI
Milestone
The purpose of this issue is to track the TODO list and the list of open design issues for the development of the Out Variable Declaration feature for C# 7. There is also a discussion thread for this feature at #6183.
Open issues:
The specification for overload resolution needs to be modified to account for the inference of the type of an _out variable_s declared withvar
.There is a proposal pending LDM decision: An out variable is read-only.LDM has made a decision to keep the variables writable.If that proposal is approved, we should see if ILocalSymbol should be extended to make the read-only status discoverable.
There is a proposal pending LDM decision:LDM has made a decision to not apply this restriction to explicitly typed variables.An out variable may not be referenced before the close parenthesis of the invocation in which it is defined:
LDM should take another look at the restriction that disallows Out Variable Declarations within constructor initializers. We might want to remove it after all.LDM has made a decision to remove this restriction.TODO:
Add tests for scope rules. Given that currently scoping rules match the rules for pattern variables, and implementation takes advantage of existing infrastructure added for pattern variables, the priority of adding these tests is low. We have pretty good suite of tests for pattern variables.Need to get an approval for the new SemanticModel.GetDeclaredSymbol API.The API has been removed because, given the new Syntax Model, we can rely on the existing API.Work with IDE team on feature specific refactorings.Related:
The text was updated successfully, but these errors were encountered: