typeof and my crummy code...

Ellery Newcomer ellery-newcomer at utulsa.edu
Thu Nov 5 16:47:55 PST 2009


given tak.d:

import std.stdio;
void main()
{
//int[1][2]([3][4] i[5][6])[7][8];

    int i(I)(int){return 1;}
    writeln(typeof(i).stringof);
}

$ dmd tak && ./tak

spits out 'void'

does this make sense, or would it make more sense as an error for not
appending the template argument? Or would it make more sense to include
the template parameter in the string?

OT: without looking at compiler output, what is the type of the
commented out i in d-style? :)


More information about the Digitalmars-d-learn mailing list