[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
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 30 04:59:04 UTC 2021
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 at puremagic.com
Reporter: n8sh.secondary at 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);
---
--
More information about the Digitalmars-d-bugs
mailing list