www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17630] New: DMD treats imports as public imports when

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 puremagic.com
          Reporter: greensunny12 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;
---

--
Jul 09 2017