[Issue 17450] New: escaping delegate context pointer not detected for member functions
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun May 28 16:47:22 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17450
Issue ID: 17450
Summary: escaping delegate context pointer not detected for
member functions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
alias dg_t = void delegate();
struct S {
@safe dg_t foo1(ref S s) {
return &s.bar; // should detect an error
}
@safe dg_t foo2(ref S s) {
return &bar; // should detect an error
}
@safe void bar();
}
--
More information about the Digitalmars-d-bugs
mailing list