← Back to index
|
Original Bugzilla link
Bug 23208 – [dip1000] missing return scope inference after parameter assignment
Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-06-23T10:47:48Z
Last change time
2024-12-13T19:23:35Z
Keywords
pull
Assigned to
No Owner
Creator
Dennis
Moved to GitHub: dmd#18113 →
Comments
Comment #0
by dkorpel — 2022-06-23T10:47:48Z
This should fail with `-preview=dip1000`: ``` int* rsfail()(scope int* p, int* r) @safe { r = p; return r; // should infer return scope on p } int* escape() @safe { int i; return rsfail(&i, null); // passes } ```
Comment #1
by dlang-bot — 2023-01-27T15:15:47Z
@dkorpel updated dlang/dmd pull request #14492 "Fix 20674, 23208, 23300 - improve `scope` inference" fixing this issue: - Fix 20674, 23208, 23300, 23294 - improve `scope` inference
https://github.com/dlang/dmd/pull/14492
Comment #2
by robert.schadek — 2024-12-13T19:23:35Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/18113
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB