[Issue 15192] DIP25: Nested ref returns are type checked unsoundly

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 29 23:23:52 PDT 2016


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

--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
Simplified:

  ref int fun(ref int x) @safe
  {
    ref int bar(){ return x; }
    return bar();
  }

This is a failure to detect that parameter x should be marked as 'return ref',
not just 'ref'.

--


More information about the Digitalmars-d-bugs mailing list