Scope and Ref and Borrowing

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 14 01:15:47 PST 2014


On Friday, 14 November 2014 at 01:21:07 UTC, Walter Bright wrote:
>   ref T foo() @safe {
>     T t;
>     ref T func() { return t; }
>     auto dg = &func;
>     return dg();  // should be disallowed
>   }

ref T f(ref T delegate() dg)
{
   return dg(); //ok?
}

On Friday, 14 November 2014 at 05:38:34 UTC, Walter Bright wrote:
> On 11/13/2014 9:36 PM, Walter Bright wrote:
>> Got a handy link to it?
>
> Found it:
>
> http://wiki.dlang.org/User:Schuetzm/scope

http://forum.dlang.org/post/etjuormplgfbomwdrurp@forum.dlang.org


More information about the Digitalmars-d mailing list