Bug 21875 – std.format: wrong number of format specifiers in nested format string of associative arrays should be detected

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-04-29T05:49:02Z
Last change time
2021-04-29T13:26:10Z
Keywords
pull
Assigned to
No Owner
Creator
Berni44

Comments

Comment #0 by bugzilla — 2021-04-29T05:49:02Z
auto aa = [ 1 : "x", 2 : "y", 3 : "z" ]; format("%(%)", spelled); format("%(%s%)", spelled); format("%(%s%s%s%)", spelled); All three format strings should be refuted with exceptions.
Comment #1 by bugzilla — 2021-04-29T05:49:37Z
Sorry, should be `aa` instead of `spelled` in all three lines.
Comment #2 by dlang-bot — 2021-04-29T06:02:33Z
@berni44 created dlang/phobos pull request #8019 "Fix Issue 21875 - std.format: wrong number of format specifiers in" fixing this issue: - Fix Issue 21875 - std.format: wrong number of format specifiers in nested format string of associative arrays should be detected https://github.com/dlang/phobos/pull/8019
Comment #3 by dlang-bot — 2021-04-29T13:26:10Z
dlang/phobos pull request #8019 "Fix Issue 21875 - std.format: wrong number of format specifiers in" was merged into master: - 45a753dd19fb6ea05cf87a6173b6f494182e0377 by berni44: Fix Issue 21875 - std.format: wrong number of format specifiers in nested format string of associative arrays should be detected https://github.com/dlang/phobos/pull/8019