Template type parameter turns to int

mpt no at mail.invalid
Sun May 11 08:20:49 PDT 2008


Given program (dmd 2.013):

void foo(T)() {
    pragma(msg, T.stringof);
}

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

I would expect the compiler to report an error about the unknown identifier, bar. Instead the program is accepted and the compiler prints "int". Is this a bug or is there a way to make it give an error?


More information about the Digitalmars-d-learn mailing list