April 01 [Issue 24473] New: it should not be possible to shadow the module name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24473 Issue ID: 24473 Summary: it should not be possible to shadow the module name Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: accepts-invalid Severity: minor Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: b2.temp@gmx.com It is allowed to shadow the module identifier, leading to situations where it is unclear what an IdentExp resolves to: ```d module Test; struct Test { static int a; } int a; void main() { Test.a = 1; // actually not a FQN } ``` -- |
Copyright © 1999-2021 by the D Language Foundation