[Issue 3845] New: [module system] A problem caused by duplicated import
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 23 17:48:23 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3845
Summary: [module system] A problem caused by duplicated import
Product: D
Version: 2.040
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-02-23 17:48:22 PST ---
A small problem in the module system.
To see this problem you need 3 source files, named test1.d, mod1.d, mod2.d:
-----------------
module mod1;
import std.string: join;
import std.string: join;
-----------------
module mod2;
import std.string: join;
-----------------
The main module is test1.d:
module test1;
import mod1, mod2;
void main() {
join(["a"], "");
}
-----------------
Got, DMD output:
test1.d(4): Error: mod1.join at mod1.d(2) conflicts with mod2.join at mod2.d(2)
Expected:
No errors, or an error in mod1 of duplicated import statement.
Note: in real code with many imports it's easy enough to import two times the
same name from the same module.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list