D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21529 - Missing format arguments are not detected at compile time
Summary: Missing format arguments are not detected at compile time
Status: RESOLVED DUPLICATE of issue 17381
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-08 14:47 UTC by Witold Baryluk
Modified: 2021-03-27 19:48 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Witold Baryluk 2021-01-08 14:47:18 UTC
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
Comment 1 Berni44 2021-03-27 19:48:48 UTC

*** This issue has been marked as a duplicate of issue 17381 ***