[Issue 683] dmd segv, this ain't the same as bug 682

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 12 23:19:51 PST 2006


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





------- Comment #1 from davidl at 126.com  2006-12-13 01:19 -------
umm when i posted this bug, i didn't know the string literal as a temp arg very
well.
the following should compile & run .. and at least the compile error message is
not reasonable
import std.stdio;
template a(char[]name, T...){
        char[] a(T t){ 
        char[] localchar;
        foreach(a;t)
        {
                writefln(`hello`);
                localchar~=typeof(a).mangleof;
        }
        return localchar;
        }
}
void main()
{
        writefln(a!("Adf", typeof("adf"),uint).a("adf",1234));
}


-- 



More information about the Digitalmars-d-bugs mailing list