http://d.puremagic.com/issues/show_bug.cgi?id=11065
Summary: Package-scoped import introduces symbol conflicts
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-09-18
14:48:25 PDT ---
test.d:
-----
module test;
import foo;
import bar;
void main()
{
auto x = RGB(0, 0, 255);
}
-----
foo.d:
-----
module foo;
struct RGB
{
ubyte r;
ubyte g;
ubyte b;
}
-----
bar.d:
-----
module bar;
package:
import core.sys.windows.windows;
-----
$ dmd -c test.d
test.d(8): Error: foo.RGB at foo.d(4) conflicts with core.sys.windows.win
dows.RGB at C:\dmd-git\dmd2\windows\bin\..\..\src\druntime\import\core\sy
s\windows\windows.d(3213)
If you remove the "package:" specifier, the error is gone. It's also unrelated
to whether these modules are actually part of any package structure (the
test-case is kept simple here).
This does not appear to be a regression (tested up to 2.060).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------