[Issue 2706] invalid template instantiation (and declaration?) is not rejected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 2 20:37:32 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2706





------- Comment #1 from tomas at famolsen.dk  2009-03-02 22:37 -------
Anoter test case:

template newTB(char[] a, char[] b)
{
    const newTB = mixin(a~"+"~b);
}

void main()
{
    int a, b;
    auto c = newTB!("a", "b");
}


Here the bogus error message:

Error: Array operations not implemented

is produced when it should be:

Error: a + b is not a constant expression.

or am I completely off here ?


-- 



More information about the Digitalmars-d-bugs mailing list