[Issue 21522] New: function get lost when aliasing an overloaded function template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 3 05:46:54 UTC 2021


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

          Issue ID: 21522
           Summary: function get lost when aliasing an overloaded function
                    template
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: boris2.9 at gmail.com

test.d:
-------------------
void funA2()(int a) {}
void funA2(char a) {} // this function get lost
alias funA = funA2;
void funA(float b) {}

static assert(__traits(getOverloads, test, "funA", true).length == 3);
-------------------

Result:
Error: static assert:  `2LU == 3LU` is false


Note: stable shows "`0LU == 3LU` is false" due to issue 20821

--


More information about the Digitalmars-d-bugs mailing list