From 91ed50767fe6ca6058aede18a124de771dbd5a84 Mon Sep 17 00:00:00 2001 From: Petr Kulikov Date: Sat, 1 Jul 2023 21:04:19 +0200 Subject: [PATCH] ref readonly is not allowed in local_variable_initializer --- standard/statements.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/standard/statements.md b/standard/statements.md index a8792f7f8..1df007a4d 100644 --- a/standard/statements.md +++ b/standard/statements.md @@ -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: >