alias overloading strange error

vitus via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 31 03:56:31 PDT 2015


//Why expression 'foobar(1);' doesn't work?


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

alias foobar = foo;
alias foobar = bar;

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

}


More information about the Digitalmars-d-learn mailing list