[Dlang-internal] DIP1000 discussion and testing
Walter Bright via Dlang-internal
dlang-internal at puremagic.com
Sat Dec 17 06:09:59 PST 2016
On 12/16/2016 9:08 AM, Mathias Lang wrote:
> void main () @safe
> {
> int* a = escape();
> }
>
> int* escape () @safe
> {
> int i;
> int*[3] a = [ &i, null, null ];
> return bar(&a[0]);
> }
>
> int* bar (scope int** x) @safe
> {
> return foo(*x);
> }
>
> int* foo (int* x) @safe { return x; }
https://github.com/dlang/dmd/pull/6329
More information about the Dlang-internal
mailing list