[Issue 17764] [scope][DIP1000] Escape checker defeated by composition transformations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 28 06:21:56 UTC 2022


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

--- Comment #5 from Walter Bright <bugzilla at digitalmars.com> ---
A simpler version that should fail to compile:

int** global;

struct S { int** str; }

void f() @safe
{
    int* buf;
    S[1] c = S(&buf);
    global = c[0].str; /* This should be rejected. */
}

--


More information about the Digitalmars-d-bugs mailing list