https://issues.dlang.org/show_bug.cgi?id=22572
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Dlang Bot <[email protected]> --- @pbackus created dlang/phobos pull request #8377 "Fix Issue 22572 - Cannot define SumType over immutable struct with Nu…" fixing this issue: - Fix Issue 22572 - Cannot define SumType over immutable struct with Nullable Previously, SumType incorrectly assumed that all members of an inout(SumType) must themselves be inout-qualified. However, this is not the case when one of those member types is declared as immutable, since the qualifier combination `immutable inout` collapses to just `immutable`. Attempting to copy an immutable member type as though it were inout caused matching to fail in SumType's copy constructor, due to the following (gagged) error: Error: `inout` on `return` means `inout` must be on a parameter as well for `pure nothrow @nogc @safe inout(Storage)(ref immutable(Value) value)` https://github.com/dlang/phobos/pull/8377 --
