Bug 22093 – [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

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-30T04:59:04Z
Last change time
2021-07-13T15:57:44Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2021-06-30T04:59:04Z
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); ---
Comment #1 by dlang-bot — 2021-06-30T05:05:14Z
@n8sh created dlang/phobos pull request #8152 "[stable] [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" fixing this issue: - Fix 22093 - [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 https://github.com/dlang/phobos/pull/8152
Comment #2 by dlang-bot — 2021-06-30T05:51:07Z
dlang/phobos pull request #8152 "[stable] [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" was merged into stable: - 9cf27f39d00931108a089c963a52c8931ca2c010 by Nathan Sashihara: Fix 22093 - [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 https://github.com/dlang/phobos/pull/8152
Comment #3 by dlang-bot — 2021-07-13T15:57:44Z
dlang/phobos pull request #8165 "merge stable" was merged into master: - c441b2ad599a4d54a08141fefec609474f75df71 by Nathan Sashihara: Fix 22093 - [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 https://github.com/dlang/phobos/pull/8165