January 12
//
// rdmd -m64 foo.d
//
module va_arg_x64_windows;

void foo(void* a, void* b, void *c, void* d, ...) {
    import core.vararg : va_arg;
    import std.stdio : writeln;

    foreach (arg; _arguments) {
        if (arg == typeid(int)) {
            int x = va_arg!(int)(_argptr);
            writeln("x: ", x);
        }
        //else {
        //    writeln("unknown arg type: ", arg.toString());
        //}
    }
}

void main() {
    foo(null, null, null, null, 1234, 5678);
    // expected:
    //     x: 1234
    //     x: 5678
    // output:
    //     x: 0
    //     x: 1234
}

January 14
So is this a bug, or am I misunderstanding something?