Bug 1910 – variadic function compilation failure

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-03-12T01:11:00Z
Last change time
2015-06-09T01:14:37Z
Assigned to
bugzilla
Creator
berzerger

Comments

Comment #0 by berzerger — 2008-03-12T01:11:32Z
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.