www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14858] New: spurious "Error: overload alias 'foo' is not a


          Issue ID: 14858
           Summary: spurious "Error: overload alias 'foo' is not a
                    variable" when overloading template and non-template
                    via aliases
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ag0aep6g gmail.com

Reported by vitus to D.learn:
http://forum.dlang.org/post/dhqqkndwgljtxnycziyo forum.dlang.org

void foo()(){}
void bar(int){}

alias foobar = foo;
alias foobar = bar;

void main()
    foobar(1); /* Error: overload alias 'foo' is not a variable */

Works when when the call has a leading dot:

Works when the order of the aliases is switched:
alias foobar = bar;
alias foobar = foo;

Aug 01 2015