Bug 20346 – std.uuid does not compile with checkaction=context

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-11-01T22:00:11Z
Last change time
2019-11-03T07:24:41Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2019-11-01T22:00:11Z
Reduced test case: struct UUID { union { ubyte[] data; } } unittest { ubyte[] data; enum ctfe = UUID(); assert(ctfe.data == data); } => Error: cannot modify constant expression UUID(null).data This is caused by _d_assert_fail taking a mutable reference to an immutable enum member. Ommiting the union { ... } does not trigger this error, this seems to be another DMD bug
Comment #1 by dlang-bot — 2019-11-01T23:19:22Z
@MoonlightSentinel created dlang/druntime pull request #2846 "Fix Issue 20346 - std.uuid does not compile with checkaction=context" fixing this issue: - Fix Issue 20346 - std.uuid does not compile with checkaction=context https://github.com/dlang/druntime/pull/2846
Comment #2 by dlang-bot — 2019-11-03T07:24:41Z
dlang/druntime pull request #2846 "Fix Issue 20346 - std.uuid does not compile with checkaction=context" was merged into master: - 151cffccdccfe0e34b047193fd9915753fead52f by MoonlightSentinel: Fix Issue 20346 - std.uuid does not compile with checkaction=context https://github.com/dlang/druntime/pull/2846