https://issues.dlang.org/show_bug.cgi?id=22572
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Dlang Bot <[email protected]> --- dlang/phobos pull request #8377 "Fix Issue 22572 - Cannot define SumType over immutable struct with Nu…" was merged into master: - 32924e3fc34676bb4e89efcbcbd202e6e9af911f by Paul Backus: 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 --
