← Back to index
|
Original Bugzilla link
Bug 882 – associative arrays with TypeInfo keys are broken for user defined types
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2007-01-24T07:47:00Z
Last change time
2014-02-15T13:13:24Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
thomas-dloop
Comments
Comment #0
by thomas-dloop — 2007-01-24T07:47:21Z
# typedef short A; # typedef float B; # # void main(){ # TypeInfo[TypeInfo] aa; printf("len:%d\n", aa.length); # aa[typeid(A)] = null; printf("len:%d\n", aa.length); # aa[typeid(B)] = null; printf("len:%d\n", aa.length); # } output: > len:0 > len:1 > len:1 Using primitive types the results are as expected: # void main(){ # TypeInfo[TypeInfo] aa; printf("len:%d\n", aa.length); # aa[typeid(short)] = null; printf("len:%d\n", aa.length); # aa[typeid(float)] = null; printf("len:%d\n", aa.length); # } output: > len:0 > len:1 > len:2
Comment #1
by thomas-dloop — 2007-02-23T16:35:51Z
*** This bug has been marked as a duplicate of 887 ***