[Issue 17630] New: DMD treats imports as public imports when selectively imported
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 9 20:37:01 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17630
Issue ID: 17630
Summary: DMD treats imports as public imports when selectively
imported
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: blocker
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: greensunny12 at gmail.com
foo.d:
---
module foo;
import c;
//import c : NotErase; // <- breaks build of module `bar`
---
bar.d:
---
module bar;
unittest
{
import foo : Erase; // A non-selective import correctly errors
assert(Erase == 2);
}
---
c.d:
---
module c;
int Erase = 2;
int NotErase = 2;
---
--
More information about the Digitalmars-d-bugs
mailing list