Friends don't let friends use inout with scope and -dip1000

Kagamin spam at here.lot
Mon Aug 20 12:56:42 UTC 2018


You need `return` attribute there, not `scope`:

struct MyStruct
{
     import core.stdc.stdlib;
     int* ints;
     this(int size) @trusted { ints = cast(int*) malloc(size); }
     ~this() @trusted { free(ints); }
     inout(int)* ptr() return inout { return ints; }
}


More information about the Digitalmars-d mailing list