docs: use a plain block scope {}, instead of if true { in the section that shows that shadowing of locals is not allowed

This commit is contained in:
Delyan Angelov 2025-02-06 09:33:19 +02:00
parent 2b479b5eb0
commit af3eda66da
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -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`
}
}