Bug 23369 – Confusing error message for duplicate import
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-09-24T16:32:31Z
Last change time
2023-05-09T09:50:47Z
Keywords
pull
Assigned to
No Owner
Creator
Jack Stouffer
Comments
Comment #0 by jack — 2022-09-24T16:32:31Z
import std.math : PI, PI;
void main() {}
Gives:
Error: alias `main.PI` conflicts with alias `main.PI` at main.d(1)
It should be something like
Error: `math.PI` imported multiple times at main.d(1)
Comment #1 by maxhaton — 2022-09-24T18:08:22Z
Doesn't seem to trigger at all for some symbols
Comment #2 by dlang-bot — 2022-09-24T22:24:25Z
@maxhaton created dlang/dmd pull request #14484 "Fix Issue 23369 - Let more symbols be imported multiple times." fixing this issue:
- Fix Issue 23369 - Let more symbols be imported multiple times.
The bug complains about the error message but the underlying problem here is that
the error doesn't trigger at all for most other kinds of symbols.
https://github.com/dlang/dmd/pull/14484