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

--- Comment #2 from Eyal <[email protected]> ---
If you change your second to:

struct S {
    ubyte x;
    align(1) int* p;
}

// @safe <-- will fail to build with this attribute, but it will infer as
@safe!
auto fun(int* p) {
    S s;
    s.p = p;
    return s;
}

// pure nothrow @nogc @safe S(int* p)
pragma(msg, typeof(fun));


i.e: make the ptr be at offset 1, misaligned - it will infer as @safe, but
refuse to type-check with @safe

--

Reply via email to