Bug 20781 – Can call @live function without checking dip1021 rules

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-04-28T09:55:50Z
Last change time
2023-02-07T08:39:03Z
Keywords
live, pull
Assigned to
No Owner
Creator
Walter Bright

Comments

Comment #0 by bugzilla — 2020-04-28T09:55:50Z
The following should give an error, even when DIP1021 is not set, as calling @live functions with multiple pointers to the same memory object should not be allowed. void test() { int a; foo(a, a); } @live int foo(ref int a, ref int b);
Comment #1 by dlang-bot — 2020-04-28T10:06:26Z
@WalterBright created dlang/dmd pull request #11071 "fix Issue 20781 - Can call @live function without checking dip1021 rules" fixing this issue: - fix Issue 20781 - Can call @live function without checking dip1021 rules https://github.com/dlang/dmd/pull/11071
Comment #2 by dlang-bot — 2023-02-07T08:39:03Z
dlang/dmd pull request #11071 "fix Issue 20781 - Can call @live function without checking dip1021 rules" was merged into master: - 62ea7b3ddb6710007b2d0b1c36502fe755a452a1 by Walter Bright: fix Issue 20781 - Can call @live function without checking dip1021 rules https://github.com/dlang/dmd/pull/11071