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

Ref locals in looping constructs — strange spec/functionality gap #3209

Open
reflectronic opened this issue Feb 18, 2020 · 1 comment
Open
Labels

Comments

@reflectronic
Copy link

There are multiple sources that claim that this feature was intended to be released in C# 7.3, as a part of the greater ref-reassignment feature. However, there needs to be some clarification as to the intended behavior of this feature:

  • There appears to be no specification for this feature.
  • The feature partially works today, but strangely not for arrays.
  • The language grammar does not indicate that this feature should exist.

Ref-local variables without initializers, which were mentioned alongside this very feature (and discussed briefly in LDM) as an "addition" to the ref-reassignment feature, currently do not function at all. So all of this leads me to believe that this feature wasn't intended to actually ship?

@agocke
Copy link
Member

agocke commented Feb 18, 2020

Yup, there's no spec for this feature. It shipped as-is. C# 7 in general needs a full specification.

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

3 participants