[Issue 21505] New: Function alias reported as conflicting function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 26 17:21:18 UTC 2020


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: nobody at puremagic.com
          Reporter: moonlightsentinel at disroot.org

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

--


More information about the Digitalmars-d-bugs mailing list