https://issues.dlang.org/show_bug.cgi?id=20142
Basile-z <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] OS|Linux |All --- Comment #3 from Basile-z <[email protected]> --- The reduced test case is not catching the problem anymore. This one does: --- void empty(T)(auto /*const*/ ref T a) { } struct Foo { int i; } void main() { enum Foo foo = Foo(0); foo.i.empty(); } --- The regression is caused by a protection on function parameters (and on assign exp too) to prevent writing member of manifest constants that are aggregates, more specifically struct literals (`enum Foo foo` from the front-end POV is actually a struct literal). Without the protection, in the past, `i` could be modified, which made no sense and could even create crashes. See https://github.com/dlang/dmd/pull/10115, which added the protection. --
