From f5cd2519c0e61a2c640345c2e5cda329008ead3a Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Tue, 8 Jun 2021 23:16:09 +0200 Subject: [PATCH] Make statement about variable visibility more precise --- src/statements.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/statements.md b/src/statements.md index 06cd9513e..8d9c21d7d 100644 --- a/src/statements.md +++ b/src/statements.md @@ -62,7 +62,8 @@ annotation and then optionally by an initializer expression. When no type annotation is given, the compiler will infer the type, or signal an error if insufficient type information is available for definite inference. Any variables introduced by a variable declaration are visible -from the point of declaration until the end of the enclosing block scope. +from the point of declaration until the end of the enclosing block scope, +except when they are shadowed by another variable declaration. ## Expression statements