mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03: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
1 changed files with 1 additions and 1 deletions
|
@ -489,7 +489,7 @@ that is already used in a parent scope will cause a compilation error.
|
||||||
```v failcompile nofmt
|
```v failcompile nofmt
|
||||||
fn main() {
|
fn main() {
|
||||||
a := 10
|
a := 10
|
||||||
if true {
|
{
|
||||||
a := 20 // error: redefinition of `a`
|
a := 20 // error: redefinition of `a`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue