https://issues.dlang.org/show_bug.cgi?id=20346
Issue ID: 20346
Summary: std.uuid does not compile with checkaction=context
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: [email protected]
Reporter: [email protected]
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
--