Bug 21320 – @live mistakes borrowed pointer for owner in parameter
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-10-17T06:59:14Z
Last change time
2020-10-17T08:03:36Z
Keywords
live, pull
Assigned to
No Owner
Creator
Walter Bright
Comments
Comment #0 by bugzilla — 2020-10-17T06:59:14Z
The code:
void free(int*);
@live void test1(scope int* p)
{
free(p); // should be an error because p is borrowed
}
Comment #1 by dlang-bot — 2020-10-17T07:05:44Z
@WalterBright created dlang/dmd pull request #11879 "fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter" fixing this issue:
- fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter
https://github.com/dlang/dmd/pull/11879
Comment #2 by dlang-bot — 2020-10-17T08:03:36Z
dlang/dmd pull request #11879 "fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter" was merged into master:
- f65085c84448bdff6bd81a51fad47874bc4e187c by Walter Bright:
fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter
https://github.com/dlang/dmd/pull/11879