Bug 24473 – it should not be possible to shadow the module name

Status
NEW
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-04-01T02:09:28Z
Last change time
2024-12-13T19:34:22Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
basile-z
See also
https://issues.dlang.org/show_bug.cgi?id=17907
Moved to GitHub: dmd#18227 →

Comments

Comment #0 by b2.temp — 2024-04-01T02:09:28Z
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 } ```
Comment #1 by robert.schadek — 2024-12-13T19:34:22Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18227 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB