[Issue 24216] New: All symbols from object are publicly imported into every module
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 1 21:19:54 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24216
Issue ID: 24216
Summary: All symbols from object are publicly imported into
every module
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: schveiguy at gmail.com
Has happened all the way back to at least 2.060
```d
import std.math;
std.math.string s = "hello";
```
Substitute `std.math` for any other module (including a completely empty
module). Substitute `string` for any other symbol in object.d.
As long as the module doesn't redefine that symbol, it's a pass-through for
object symbols.
Fully-qualified-names should only resolve to names defined within that module.
--
More information about the Digitalmars-d-bugs
mailing list