https://issues.dlang.org/show_bug.cgi?id=18792
--- Comment #3 from Per Nordlöw <[email protected]> --- (In reply to Per Nordlöw from comment #2) > Small enough, Walter? Forgot to remove obselete comments. Here's a new version with irrelevant comments removed. struct SSOString { pure nothrow @nogc: inout(char)[] opSlice() inout return scope @trusted { return small.data[0 .. small.length]; } struct Small { ubyte length; char[15] data; } struct Raw { size_t length; char* ptr; } union { Raw raw; // PROBLEM this declaration prevents DIP-1000 scope analysis from kicking in in `opSlice` Small small; } } @safe pure nothrow @nogc unittest { char[] shouldFail1() @safe pure nothrow @nogc { SSOString x; return x[]; // TODO should fail with -dip1000 } } --
