Skip to content

Commit

Permalink
ref readonly is not allowed in local_variable_initializer (#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulikov authored Jul 6, 2023
1 parent 4428cd2 commit 0df4171
Showing 1 changed file with 2 additions and 2 deletions.
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.

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

0 comments on commit 0df4171

Please sign in to comment.