[Issue 23961] New: Overload set created using selective imports causes declarations to conflict with themselves

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 4 11:34:46 UTC 2023


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

          Issue ID: 23961
           Summary: Overload set created using selective imports causes
                    declarations to conflict with themselves
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dlang-bugzilla at thecybershadow.net

///////// a.d /////////
void fun(int v) {}
///////// b.d /////////
void fun(string v) {}
///////// c.d /////////
public import a : fun;
private import b : fun;
//////// test.d ///////
import a;
import c;

void main()
{
    fun(1);
}
///////////////////////

Compiler says:

test.d(6): Error: `fun` matches conflicting symbols:
a.d(1):        function `a.fun`
a.d(1):        function `a.fun`

--


More information about the Digitalmars-d-bugs mailing list