[Issue 17049] [scope] class references are not escape checked like pointers
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Feb 24 14:50:22 PST 2017
https://issues.dlang.org/show_bug.cgi?id=17049
--- Comment #7 from Martin Nowak <code at 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
}
--
More information about the Digitalmars-d-bugs
mailing list