https://issues.dlang.org/show_bug.cgi?id=22783
Issue ID: 22783
Summary: [dip1000] member function can pass pointer to member
members to non-scope arg
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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);
}
}
------
--