[Issue 20150] New: -dip1000 defeated by pure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 22 10:12:09 UTC 2019


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

          Issue ID: 20150
           Summary: -dip1000 defeated by pure
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: safe
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com

This is a spin-off from issue 19175.

----
int* escape(int* r) @safe pure
{
    return r;
}

int* f() @safe
{
    int x = 42;
    return escape(&x); /* Should not compile. */
}
----

Tested with v2.087.0 and v2.088.0-beta.1-46-g0459e34e (current git master).

--


More information about the Digitalmars-d-bugs mailing list