From af3eda66dac7382d0077277b761ad9f7b611f50b Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 6 Feb 2025 09:33:19 +0200 Subject: [PATCH] docs: use a plain block scope `{}`, instead of `if true {` in the section that shows that shadowing of locals is not allowed --- doc/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/docs.md b/doc/docs.md index 51c0d21be6..31432ac2f7 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -489,7 +489,7 @@ that is already used in a parent scope will cause a compilation error. ```v failcompile nofmt fn main() { a := 10 - if true { + { a := 20 // error: redefinition of `a` } }