Summary: writefln silently ignores arguments not present in the
                    format string
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from 2010-09-23 15:33:40 PDT ---
With dmd 2.049 this program:

import std.stdio: writefln;
void main() {
    writefln("%d", 1, 2);


But in this case I expect a compile-time error (or equivalent run-time error if
the compiler is lazy and doesn't perform such very basic tests at
compile-time), because the format string doesn't contain the same things as the
given arguments.

In this case printing 12 is not good, because when a writefln is used, it's
better to avoid possible bugs to enforce that arguments and format string match

See also bug 4458

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to