mirror of
https://github.com/vlang/v.git
synced 2025-08-03 17:57:59 -04:00
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:
parent
2b479b5eb0
commit
af3eda66da
@ -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`
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user