Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuple.toString does not work with mutable toString #10378

Open
dlangBugzillaToGithub opened this issue Jul 6, 2019 · 0 comments
Open

Tuple.toString does not work with mutable toString #10378

dlangBugzillaToGithub opened this issue Jul 6, 2019 · 0 comments
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Enhancement

Comments

@dlangBugzillaToGithub
Copy link

timon.gehr reported this on 2019-07-06T17:44:21Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=20031

Description

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)"
@LightBender LightBender removed the P4 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants