[Issue 19749] Inout causes wrong type inference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 21 08:52:05 UTC 2019


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

--- Comment #5 from Ali Ak <ali.akhtarzada at gmail.com> ---
No it doesn't. It changes them by moving them around.

struct S(T) {
    pragma(msg, T);
}

auto make(T)(inout T s) { return inout S!T(); }

pragma(msg, typeof(make("hi")));

// prints
// char[]
// immutable(S!(char[]))

--


More information about the Digitalmars-d-bugs mailing list