← Back to index
|
Original Bugzilla link
Bug 3890 – Bad writeln of a nested struct
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-03-07T17:02:00Z
Last change time
2015-06-09T01:27:39Z
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2010-03-07T17:02:05Z
This small D2 program prints just: Pair Instead of something better like: Pair("hello", Int(5)) import std.stdio: writeln; struct Int { int x; const bool opEquals(ref const Int other) { return this.x == other.x; } } struct Pair { string s; Int i; } void main() { writeln(Pair("hello", Int(5))); }
Comment #1
by k.hara.pg — 2011-09-02T12:07:03Z
https://github.com/D-Programming-Language/phobos/pull/126