[Issue 808] New: using properties as lvalues

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 6 18:49:29 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=808

           Summary: using properties as lvalues
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: www.digitalmars.com
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thecybershadow at gmail.com


I've been wondering - what is actually preventing us to operate with properties
like real lvalues? For example,

int[] array;
array.length++;      // Error: (array).length is not an lvalue
array.length += 2;   // Error: (array).length is not an lvalue

however,

array.length = array.length + 1; // works

Unless there's a fair reason of why this isn't viable, I'd suggest implementing
this.


-- 



More information about the Digitalmars-d-bugs mailing list