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

           Summary: writefln("%f"  of a Tuple prints a result
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2010-10-16 16:55:11 PDT ---
import std.stdio: writefln;
import std.typecons: Tuple;
void main() {
    writefln("%f", (Tuple!(int)).init);
}


Compiled with DMD 2.049 prints at runtime:
Prints: Tuple!(int)(0)

But I expect a compile-time error for the mismatch of the format string (and if
that's not possible because the D compiler doesn't perform this basic test at
compile-time, at run-time).

writefln() probably needs more unittests.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to