June 30, 2021 [Issue 22093] New: [Reg 2.097] std.typecons.RefCounted!T for struct T without an explicit toString or alias this previously could be converted to string even when uninitialized but now cannot be | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22093 Issue ID: 22093 Summary: [Reg 2.097] std.typecons.RefCounted!T for struct T without an explicit toString or alias this previously could be converted to string even when uninitialized but now cannot be Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: n8sh.secondary@hotmail.com Below code compiles up through 2.096 but in 2.097 fails with "Attempted to access an uninitialized payload". --- import std.conv : to; import std.typecons : RefCounted, RefCountedAutoInitialize; static struct A { int a; } alias R = RefCounted!(A, RefCountedAutoInitialize.no); enum e = to!string(R.init); --- -- |
Copyright © 1999-2021 by the D Language Foundation