www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18771] New: Identical overload sets in different modules have

https://issues.dlang.org/show_bug.cgi?id=18771

          Issue ID: 18771
           Summary: Identical overload sets in different modules have
                    different identities
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: timon.gehr gmx.ch

DMD v2.079.0:

---
module a;
void foo(int){}
---

---
module b;
void foo(string){}
---

---
module c;
import a, b;
alias fooC=foo;
---

---
module d;
import a, b;
alias fooD=foo;
---

---
module e;
import c, d;
static assert(__traits(isSame, fooC, fooD)); // fail
---

The code should compile.

--
Apr 17 2018