www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18661] New: auto ref and return attribute inference


          Issue ID: 18661
           Summary: auto ref and return attribute inference
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

John Colvin reports:

struct S0(T)
    int a;
    auto ref immutable(int) getA() { return a; }

alias A = S0!int;

test.d(4): Error: function type pure nothrow  nogc return  safe
immutable(int)() has return but does not return any indirections

Mar 25 2018