[Issue 20116] Cannot return inout return value from delegate

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 14 19:23:43 UTC 2019


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

--- Comment #1 from Harry Vennik <htvennik at gmail.com> ---
Tested once again with an additional pragma statement in main():

void main()
{
    C c;
    pragma(msg, typeof(&c.arr));
    foo(&c.arr);
}

The pragma outputs: inout(int[]) delegate() inout nothrow @nogc @property @safe

Since the delegate's context actually gets typed as inout, foo() does in fact
have an inout parameter.

--


More information about the Digitalmars-d-bugs mailing list