D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16676 - [REG2.072.0] std.format fails with %02d in dstring format string
Summary: [REG2.072.0] std.format fails with %02d in dstring format string
Status: RESOLVED DUPLICATE of issue 16661
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-09 08:32 UTC by Vladimir Panteleev
Modified: 2016-11-16 23:40 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2016-11-09 08:32:24 UTC
//////////////// test.d ///////////////
import std.string;

void main()
{
    assert("%02d"d.format(1) == "01"d);
}
///////////////////////////////////////

Code throws "Incorrect format specifier: 02d" exception at runtime.

Introduced in https://github.com/D-Programming-Language/phobos/pull/4427.
Comment 1 Vadim Lopatin 2016-11-09 09:14:12 UTC
Same issue with wstring format
Comment 2 Martin Nowak 2016-11-16 23:40:37 UTC

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