DIP 1021--Argument Ownership and Function Calls--Final Review

Walter Bright newshound2 at digitalmars.com
Wed Sep 18 09:54:05 UTC 2019


On 9/17/2019 10:18 AM, Exil wrote:
> Another issue:
> 
>      @safe:
> 
> 
>      void foo(ref int, ref int) {
>      }
> 
>      void test() {
>          int b;
> 
>          int* a = &b;
>          int* c = &b;
> 
>          // foo( b, b); // error
> 
>          foo( *a, *c); // but this is ok
>      }

Yeah, that requires data flow analysis, which this DIP doesn't do. The @live one 
covers flow analysis.


More information about the Digitalmars-d mailing list