www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2736] New: ref returns from 'properties' can't be the LHS of augmentation assignment

reply d-bugmail puremagic.com writes:

           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
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jarrett.billingsley gmail.com

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()

Mar 15 2009
parent d-bugmail puremagic.com writes:

yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED

--- Comment #2 from yebblies <yebblies gmail.com> 2011-07-03 15:29:10 EST ---
This works with dmd from github.  Probably fixed by the  property patch.

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 02 2011