Bug 290 – "U" shaped import name conflicts when using Fully Qualified names

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-08-16T19:33:00Z
Last change time
2014-02-15T13:19:44Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
bruno.do.medeiros+deebugz

Attachments

IDFilenameSummaryContent-TypeSize
22testcase.zipZipped testcaseapplication/x-zip-compressed962

Comments

Comment #0 by bruno.do.medeiros+deebugz — 2006-08-16T19:33:16Z
In a "U" shaped structure of imports, name conflicts occur on the bottom module (main) when accessing top module entities (pack.tier2*) with a fully qualified name, as both tier1 modules think they have a different pack. Code: ---- main.d ---- import tier1_A; import tier1_B; alias pack DUMMY; auto x1 = &pack.tier2_A.foonumA; auto x2 = &pack.tier2_B.foonumB; // any the above gets the error: // import tier1_A.pack conflicts with tier1_B.pack at tier1_B.d(3) ---- tier1_A.d ---- module tier1_A; public import pack.tier2_A; ---- tier1_B.d ---- module tier1_B; public import pack.tier2_B; ---- pack/tier2_A.d ---- module pack.tier2_A; int foonumA; ---- pack/tier2_B.d ---- module pack.tier2_B; int foonumB;
Comment #1 by bruno.do.medeiros+deebugz — 2006-08-16T19:38:07Z
Created attachment 22 Zipped testcase
Comment #2 by bruno.do.medeiros+deebugz — 2006-10-16T16:58:33Z
Fixed DMD 0.169 . Likely a duplicate of #386
Comment #3 by bruno.do.medeiros+deebugz — 2006-10-16T17:00:55Z
forgot to change to FIXED