https://issues.dlang.org/show_bug.cgi?id=17049
--- Comment #4 from Martin Nowak <c...@dawg.eu> --- There is a difference from member functions to free function. static @safe S* get2(return ref scope S _this) { return &_this; } struct S { @safe S* get1() return scope { return &this; } } S* escape() @safe { S s; auto ps1 = s.get1(); auto ps2 = s.get2(); return ps1; // works // return ps2; // doesn't work } --