[Issue 14935] [Operator Overloading] Wrong description on overloading a[]

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 20 05:57:54 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14935

--- Comment #6 from Ryuichi OHORI <r.97all at gmail.com> ---
I agree with you on closing this as invalid. The main problem was that I missed
opIndexOpAssign and tried to use opIndex/opSlice (of a struct S) + opOpAssign
(of the returning Voldemort type of S.opIndex).

While I went wrong, the error message "cannot be sliced with []" is not so
helpful as to help me figuring out the problem.

One of the reasons I missed opIndexOpAssign was that it is categorized under Op
Assignment Operator Overloading. I'd like to place it under Array Indexing and
Slicing Operators Overloading.

--


More information about the Digitalmars-d-bugs mailing list