[Issue 20031] New: Tuple.toString does not work with mutable toString
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 6 17:44:21 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20031
Issue ID: 20031
Summary: Tuple.toString does not work with mutable toString
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: timon.gehr at gmx.ch
DMD64 D Compiler v2.086.0:
import std.stdio, std.typecons;
struct S{
string toString(){ return "not broken"; }
}
void main(){
writeln(S()); // "not broken"
writeln(tuple(S(),S())); // "Tuple!(S, S)(const(S)(), const(S)())"
}
The second writeln should print: "Tuple!(S, S)(not broken, not broken)"
--
More information about the Digitalmars-d-bugs
mailing list