https://issues.dlang.org/show_bug.cgi?id=17049
--- Comment #7 from Martin Nowak <c...@dawg.eu> --- And this is supposed to not work? struct Handle { int a; } static @safe Handle get2(return ref scope S _this) { return Handle(1); } struct S { } Handle escape() @safe { S s; auto h = s.get2(); return h; // works } --