Compiler fails (returns status code == 1) to compile this code:
int main(char[][] args)
{
{
/* variadic test */
void variadicFoo(...)
{
foreach(info; _arguments)
{
writefln(info);
}
}
variadicFoo(3, 3.0, 54.f, true);
}
}
but all is ok when variadic function is not nested.
Comment #1 by smjg — 2008-11-20T20:37:46Z
I can't reproduce this. Rather, I get these errors (2.019):
bz1910.d(9): Error: undefined identifier writefln
bz1910.d(9): Error: function expected before (), not writefln of type int
bz1910.d(1): function bz1910.main expected to return a value of type int
which is basically what should be happening. If I fix the errors that led to this, the program compiles and runs as expected.