Bug 18778 – std.format: Positional arguments do not work as expected with nesting
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-18T20:32:35Z
Last change time
2018-11-16T05:47:42Z
Assigned to
No Owner
Creator
briancschott
Comments
Comment #0 by briancschott — 2018-04-18T20:32:35Z
---
void main()
{
import std.stdio;
writefln("%-(%1$s - %1$s%|, %)", ["A", "B", "C"]);
}
---
Actual output: "A - %1$s, B - %1$s, C - %1$s"
Expected output: "A - A, B - B, C - C"
Comment #1 by github-bugzilla — 2018-11-16T05:47:42Z