Skip to content

Commit 804065a

Browse files
author
Makhnev Petr
authored
docs: remove note illustrating shadowng of import name, due to 0b7a1cd (#17208)
1 parent 0b7a1cd commit 804065a

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

doc/docs.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -448,17 +448,6 @@ fn main() {
448448
Unlike most languages, variable shadowing is not allowed. Declaring a variable with a name
449449
that is already used in a parent scope will cause a compilation error.
450450

451-
You can shadow imported modules though, as it is very useful in some situations:
452-
```v ignore
453-
import ui
454-
import gg
455-
456-
fn draw(ctx &gg.Context) {
457-
gg := ctx.parent.get_ui().gg
458-
gg.draw_rect(10, 10, 100, 50)
459-
}
460-
```
461-
462451
## V Types
463452

464453
### Primitive types

0 commit comments

Comments
 (0)