[Issue 3821] writeln doesn't detect recursive data structures yet
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 11 23:53:14 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=3821
--- Comment #5 from bearophile_hugs at eml.cc ---
(In reply to Andrej Mitrovic from comment #1)
> Got a newer example maybe? std.boxer is long gone.
Is this good enough?
void main() {
import std.stdio, std.variant;
auto a = new Variant[1];
a[0] = a;
writeln(a); // Error: Stack Overflow
}
--
More information about the Digitalmars-d-bugs
mailing list