Bug 295 – Property call followed by sliceAssign not working for custom opSliceAssign

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-08-19T07:30:00Z
Last change time
2014-02-15T13:18:40Z
Assigned to
bugzilla
Creator
oskar.linde

Comments

Comment #0 by oskar.linde — 2006-08-19T07:30:08Z
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 }
Comment #1 by bugzilla — 2006-09-02T19:44:47Z
Fixed 0.166
Comment #2 by thomas-dloop — 2006-10-06T02:10:37Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] 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-----