[Issue 22619] [REG2.098.1] Nullable regression introduced by new copy ctor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 8 09:35:57 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22619

elronnd at elronnd.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |elronnd at elronnd.net

--- Comment #2 from elronnd at elronnd.net ---
Golfed:

union Wrapper(T) {
        T x;
        this(inout T value) {
                this.x = value;
        }
        this(ref scope inout Wrapper!T rhs) inout {
                this.x = rhs.x;
        }
}

void f(const ref Wrapper!string x) {
        auto r = Wrapper!(typeof(x))(x);
}

--


More information about the Digitalmars-d-bugs mailing list