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

          Issue ID: 21505
           Summary: Function alias reported as conflicting function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Consider the following code:

=====================================
void bar (int s) {}
void foo (int s) {}
alias bar = foo;

void main ()
{
   bar(0);
}

=====================================

Before:

test.d(7): Error: test.foo called with argument types (int) matches both:
test.d(1):     test.foo(int s)
and:
test.d(2):     test.bar(int s)

Now:

test.d(2): Error: function test.bar(int s) conflicts with previous declaration
at test.d(1)

Introduced by https://github.com/dlang/dmd/pull/8429

--

Reply via email to