1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: remove note illustrating shadowng of import name, due to 0b7a1cd (#17208)

This commit is contained in:
Makhnev Petr 2023-02-03 11:17:56 +04:00 committed by GitHub
parent 0b7a1cd7ce
commit 804065a0fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -448,17 +448,6 @@ fn main() {
Unlike most languages, variable shadowing is not allowed. Declaring a variable with a name Unlike most languages, variable shadowing is not allowed. Declaring a variable with a name
that is already used in a parent scope will cause a compilation error. that is already used in a parent scope will cause a compilation error.
You can shadow imported modules though, as it is very useful in some situations:
```v ignore
import ui
import gg
fn draw(ctx &gg.Context) {
gg := ctx.parent.get_ui().gg
gg.draw_rect(10, 10, 100, 50)
}
```
## V Types ## V Types
### Primitive types ### Primitive types