Bug 17450 – escaping delegate context pointer not detected for member functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-05-28T23:47:00Z
Last change time
2017-08-07T13:16:28Z
Keywords
safe
Assigned to
nobody
Creator
bugzilla
See also
https://issues.dlang.org/show_bug.cgi?id=17448

Comments

Comment #0 by bugzilla — 2017-05-28T23:47:22Z
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(); }
Comment #1 by bugzilla — 2017-05-28T23:55:47Z
Comment #2 by github-bugzilla — 2017-05-29T12:22:59Z
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 <[email protected]>
Comment #3 by github-bugzilla — 2017-08-07T13:16:28Z
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