https://issues.dlang.org/show_bug.cgi?id=17430
Issue ID: 17430
Summary: [scope] delegate can escape context ptr
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P3
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
cat > bug.d << CODE
struct S { void foo() {} }
void delegate() bar() @safe
{
S s;
auto dg = &s.foo; // should be inferred as scope
return dg;
}
CODE
dmd -c -dip1000 bug
--
