Thread overview
[Issue 295] New: Property call followed by sliceAssign not working for custom opSliceAssign
Aug 19, 2006
d-bugmail
Sep 03, 2006
d-bugmail
Oct 06, 2006
Thomas Kuehne
August 19, 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@digitalmars.com
        ReportedBy: oskar.linde@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
}


-- 

September 03, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=295


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from bugzilla@digitalmars.com  2006-09-02 19:44 -------
Fixed 0.166


-- 

October 06, 2006
d-bugmail@puremagic.com schrieb am 2006-08-19:
> http://d.puremagic.com/issues/show_bug.cgi?id=295

> 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
> }

Added to DStress as http://dstress.kuehne.cn/run/o/opSliceAssign_02_A.d http://dstress.kuehne.cn/run/o/opSliceAssign_02_B.d http://dstress.kuehne.cn/run/o/opSliceAssign_02_C.d http://dstress.kuehne.cn/run/o/opSliceAssign_02_D.d

Thomas