www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22783] New: [dip1000] member function can pass pointer to


          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: nobody puremagic.com
          Reporter: Ajieskola gmail.com

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.

Feb 16 2022