On 12/31/14, Andrei Alexandrescu via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On 12/30/14 7:32 PM, Manu via Digitalmars-d wrote: >> void mayEscape(ref int x); // <-- may escape this ref arg >> >> void t() >> { >> int onStack = 1; >> mayEscape(onStack); // <- perfectly legal, and equally unsafe >> } > > DIP25 puts this code in illegality. I don't think the proposal has been > explicit about that, will fix. Thanks! -- Andrei
Wait, what? Passing stack variables by ref will be disallowed?