Top 5

nazo lovesyao at gmail.com
Wed Oct 8 16:29:55 PDT 2008


nazo wrote:
> 2. "int+long" is supported but "foo(int, long)" is not supported

oops, this is my mistake. it's works with mysterious way.


import std.stdio;
alias int Int;
alias long Long;

typeof(Int + Long) foo(){
   return 10;
}

void baz(Int a, Long b){
}

typeof(baz(Int, Long)) bar(){
}

void main(){
   writefln(foo());
   bar();
}



More information about the Digitalmars-d mailing list