www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15120] New: alias overload set combine error message


          Issue ID: 15120
           Summary: alias overload set combine error message
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

auto foo(T)(T a){}

auto foo(T)(T a){}

import modB, modC;
alias foo = modB.foo;
alias foo = modC.foo;

void main()

modA.d(7): Error: modA.foo called with argument types (float) matches both:
modB.d(1):     modB.foo!float.foo(float a)
modC.d(1):     modC.foo!float.foo(float a)

which makes perfect sense. However, if we drop the . before foo, i.e.

modA.d(7): Error: overload alias 'foo' is not a variable

which is very odd.

Sep 26 2015