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(); }
https://github.com/dlang/dmd/pull/6839
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e3e8ce24b0ca5b0aa0f300da854fef439973df03 fix Issue 17450 - escaping delegate context pointer not detected for member functions https://github.com/dlang/dmd/commit/b0b461765dc8c8baf1d615ce3600948e990daa56 Merge pull request #6839 from WalterBright/fix17450 fix Issue 17450 - escaping delegate context pointer not detected for … merged-on-behalf-of: Daniel Murphy <yebblies@gmail.com>
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e3e8ce24b0ca5b0aa0f300da854fef439973df03 fix Issue 17450 - escaping delegate context pointer not detected for member functions https://github.com/dlang/dmd/commit/b0b461765dc8c8baf1d615ce3600948e990daa56 Merge pull request #6839 from WalterBright/fix17450