www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21522] New: function get lost when aliasing an overloaded

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 puremagic.com
          Reporter: boris2.9 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

--
Jan 02