Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Out Variable Declaration" work items and open design issues #11566

Open
7 of 8 tasks
AlekseyTs opened this issue May 25, 2016 · 1 comment
Open
7 of 8 tasks

"Out Variable Declaration" work items and open design issues #11566

AlekseyTs opened this issue May 25, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@AlekseyTs
Copy link
Contributor

AlekseyTs commented May 25, 2016

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 with var.
  • There is a proposal pending LDM decision: An out variable is read-only.
    If that proposal is approved, we should see if ILocalSymbol should be extended to make the read-only status discoverable.
    LDM has made a decision to keep the variables writable.
  • There is a proposal pending LDM decision:
    An out variable may not be referenced before the close parenthesis of the invocation in which it is defined:
    LDM has made a decision to not apply this restriction to explicitly typed variables.
    M(out int x, x = 3); // allowed
    M(out var x, x = 3); // error
  • 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.
  • Add tests for lambdas and await capturing out 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:

@AlekseyTs AlekseyTs self-assigned this May 25, 2016
@AlekseyTs AlekseyTs changed the title "Out Variable Declaration" work items and open issues "Out Variable Declaration" work items and open design issues May 25, 2016
@AlekseyTs AlekseyTs added this to the 2.0 (RC) milestone May 25, 2016
@AlekseyTs
Copy link
Contributor Author

AlekseyTs commented May 26, 2016

Dear GitHub members, this is not an issue for discussions. There is a discussion thread for this feature at #6183. Thanks for understanding.

@jaredpar jaredpar modified the milestones: 2.0 (RC), 2.0 (RTM) Jul 18, 2016
@jcouv jcouv added the Test Test failures in roslyn-CI label Jan 19, 2017
@jaredpar jaredpar modified the milestones: 2.0 (RTM), 15.3 Mar 27, 2017
@jaredpar jaredpar modified the milestones: 15.later, 15.3 May 15, 2017
@jaredpar jaredpar modified the milestones: 15.6, 15.7 Jan 4, 2018
@gafter gafter modified the milestones: 15.7, 16.0 May 18, 2018
@jinujoseph jinujoseph modified the milestones: 16.0, 16.3 Jun 9, 2019
@jcouv jcouv modified the milestones: 16.3, Compiler.Next Jul 16, 2019
@jaredpar jaredpar removed this from the Compiler.Next milestone Sep 12, 2023
@jaredpar jaredpar added this to the Backlog milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants