[Issue 21529] New: Missing format arguments are not detected at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 8 14:47:18 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21529

          Issue ID: 21529
           Summary: Missing format arguments are not detected at compile
                    time
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: witold.baryluk+d at gmail.com

This code should not compile, but it does:

void main() {
    import std.stdio;
    const int a = 512;
    const double b = 123.0 / a;
    writefln!"%s %f %f"(a, 100.0 / b);
}


https://godbolt.org/z/j6qszx

--


More information about the Digitalmars-d-bugs mailing list