Bug 24663 – dip1000 doesn't check slice expression implicitly converted to static array

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-07-15T13:21:18Z
Last change time
2024-07-16T14:47:16Z
Keywords
pull, safe
Assigned to
No Owner
Creator
Dennis

Comments

Comment #0 by dkorpel — 2024-07-15T13:21:18Z
These should error with dip1000 for returning a `scope int*`: ``` int*[3] escape8b(scope int*[3] p) @safe { return p[]; } ref int*[3] escape9b(scope int*[3] p) @safe { return p[]; } ``` But they currently compile without error.
Comment #1 by dlang-bot — 2024-07-15T13:32:00Z
@dkorpel created dlang/dmd pull request #16705 "Fix bugzilla 24663 - dip1000 doesn't check slice expression implicitl…" fixing this issue: - Fix bugzilla 24663 - dip1000 doesn't check slice expression implicitly converted to static array https://github.com/dlang/dmd/pull/16705
Comment #2 by dlang-bot — 2024-07-16T14:47:16Z
dlang/dmd pull request #16705 "Fix bugzilla 24663 - dip1000 doesn't check slice expression implicitl…" was merged into master: - 7df516b92bed810d2d802423f69322e329526345 by Dennis Korpel: Fix bugzilla 24663 - dip1000 doesn't check slice expression implicitly converted to static array https://github.com/dlang/dmd/pull/16705