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: [email protected]
Reporter: [email protected]
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)"
--