Bug 22783 – [dip1000] member function can pass pointer to member members to non-scope arg

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-02-16T20:42:25Z
Last change time
2022-02-16T21:13:57Z
Assigned to
No Owner
Creator
Ate Eskola

Comments

Comment #0 by Ajieskola — 2022-02-16T20:42:25Z
Compiled with -dip1000, latest master: ------ const(char)* charPtr; // argument is not, or should not be scope auto listUp(const(char)* content){registry = content;} struct DontDoThis { char content; @safe escape() { // should not compile, but does. listUp(&content); } } ------
Comment #1 by dkorpel — 2022-02-16T21:13:57Z
This has the same underlying issue as issue 22782, closing as duplicate *** This issue has been marked as a duplicate of issue 22782 ***