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: nob...@puremagic.com
          Reporter: bugzi...@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();
}

--

Reply via email to