Bug 9592 – Justified Tuple printing

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-25T18:48:32Z
Last change time
2019-12-12T12:06:48Z
Keywords
pull
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-02-25T18:48:32Z
import std.stdio: writeln, writefln; import std.typecons: tuple; void main() { auto s = "hello"; writefln(">%40s<", s); writefln(">%-40s<", s); auto t = tuple("hello"); writefln(">%40s<", t); writefln(">%-40s<", t); } dmd 2.063alpha prints: > hello< >hello < >Tuple!(string)("hello")< >Tuple!(string)("hello")< But maybe it should print: > hello< >hello < > Tuple!(string)("hello")< >Tuple!(string)("hello") < -------------------- Note: currently this code doesn't give an error, I don't know if this is correct: import std.stdio: writefln; void main() { auto s = "hello"; writefln(">%-s<", s); } It prints: >hello<
Comment #1 by dlang-bot — 2019-10-25T09:27:40Z
@berni44 created dlang/phobos pull request #7254 "Fix Issue 9592 - Justified Tuple printing" fixing this issue: - Fix Issue 9592 - Justified Tuple printing https://github.com/dlang/phobos/pull/7254
Comment #2 by dlang-bot — 2019-10-28T05:43:15Z
dlang/phobos pull request #7254 "Fix Issue 9592 - Justified Tuple printing" was merged into master: - 779b9cb53cfafeb5ba1d5fd9aac53489b4731a15 by Bernhard Seckinger: Fix Issue 9592 - Justified Tuple printing https://github.com/dlang/phobos/pull/7254
Comment #3 by petar.p.kirov — 2019-10-28T05:52:10Z
Pull request https://github.com/dlang/phobos/pull/7254 addressed part of the issues with this bug, but there are some remaining (check the PR description for details).
Comment #4 by bugzilla — 2019-12-12T12:06:48Z
*** This issue has been marked as a duplicate of issue 7341 ***