[Issue 24473] New: it should not be possible to shadow the module name
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 1 02:09:28 UTC 2024
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 at puremagic.com
Reporter: b2.temp at 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
}
```
--
More information about the Digitalmars-d-bugs
mailing list