Summary: ref returns from 'properties' can't be the LHS of
                    augmentation assignment
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

struct S
    int mX;

    ref int x()
        return mX;

void main()
    S s;
    s.x += 4; // line 20

foo.d(20): Error: 's.x' is not a scalar, it is a ref int()
foo.d(20): Error: incompatible types for ((s.x) += (4)): 'ref int()' and 'int'
foo.d(20): Error: 's.x' is not of arithmetic type, it is a ref int()


Reply via email to