www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20781] New: Can call live function without checking dip1021

https://issues.dlang.org/show_bug.cgi?id=20781

          Issue ID: 20781
           Summary: Can call  live function without checking dip1021 rules
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

The following should give an error, even when DIP1021 is not set, as calling
 live functions with multiple pointers to the same memory object should not be
allowed.

  void test() {
    int a;
    foo(a, a);
  }

   live int foo(ref int a, ref int b);

--
Apr 28