Bug 21401 – Writelning a tuple ignores member's toString.

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-11-17T02:55:21Z
Last change time
2024-12-01T16:37:58Z
Assigned to
No Owner
Creator
Jonathan Levi
Moved to GitHub: phobos#9811 →

Comments

Comment #0 by jonathanilevi — 2020-11-17T02:55:21Z
With ``` struct X { string toString() { return "hi"; } } ``` `writeln( tuple(X()) );` prints `Tuple!(X)(const(X)())` not `Tuple!(X)("hi")`. Stringing a tuple should use the toString of its members.
Comment #1 by robert.schadek — 2024-12-01T16:37:58Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9811 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB