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 readonly is not allowed in local_variable_initializer #831

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions standard/statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ In the context of a local variable declaration, the identifier `var` acts as a c

- The *local_variable_declaration* cannot include multiple *local_variable_declarator*s.
- The *local_variable_declarator* shall include a *local_variable_initializer*.
- The *local_variable_initializer* shall be an *expression*, optionally preceded by `ref` or `ref readonly`.
- The *local_variable_initializer* shall be an *expression*, optionally preceded by `ref`.
- The initializer *expression* shall have a compile-time type.
- The initializer *expression* cannot refer to the declared variable itself
- The initializer *expression* cannot refer to the declared variable itself.
pkulikov marked this conversation as resolved.
Show resolved Hide resolved

> *Example*: The following are incorrect implicitly typed local variable declarations:
>
Expand Down