[Issue 295] New: Property call followed by sliceAssign not working	for custom opSliceAssign
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Aug 19 05:30:10 PDT 2006
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=295
           Summary: Property call followed by sliceAssign not working for
                    custom opSliceAssign
           Product: D
           Version: 0.164
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: oskar.linde at gmail.com
struct A {
  void opSliceAssign(int x) {}
  A d() { return *this; }
}
void main() {
  A a;
  a.d[] = 5; // ERROR: A cannot be sliced with []
  a.d()[] = 5; // Works
}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list