[Issue 295] New: Property call followed by sliceAssign not working for custom opSliceAssign
Thomas Kuehne
thomas-dloop at kuehne.cn
Fri Oct 6 00:05:38 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at 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
-----BEGIN PGP SIGNATURE-----
iD8DBQFFJguqLK5blCcjpWoRAs4KAJ9hxNpnVCx8HbKrSGVPtW0jmcw03wCfXHXb
y8H9CXAB5f0esvenP6VhoCU=
=q0F7
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list