Dictionary key of Xml type are not matching

NEW
Unassigned

Status

9 years ago
9 years ago

People

(Reporter: dschaffe, Unassigned)

Tracking

unspecified
Future
x86
Mac OS X
Bug Flags:
flashplayer-qrb +
flashplayer-triage +

Details

(Reporter)

Description

9 years ago
Using XML as a Dictionary key does not match when two keys have == equality

It seems reasonable if two variables succeed with == equality should work as a key.

bug.as:
import flash.utils.Dictionary;
var d:Dictionary=new Dictionary();
var x:XML=<root><child><value/></child></root>;
var c1:XML=x.child[0];
var c2:XML=x.child[0];

print
print("c1:"+c1);
print("c2:"+c2);
print("c1==c2:"+c1==c2);
d[c1]=1;
print("d[c1]:"+d[c1]);
print("d[c2]:"+d[c2]);

output:
c1:<child>
  <value/>
</child>
c2:<child>
  <value/>
</child>
false
d[c1]:1
d[c2]:undefined

expected:
since c1==c2 and d[c2]==1, d[c2] should == 1 also

print(d[c2]); -> undefined

from jira community bug: http://bugs.adobe.com/jira/browse/FP-587
Flags: flashplayer-triage+
Flags: flashplayer-qrb?

Updated

9 years ago
Target Milestone: --- → Future

Updated

9 years ago
Flags: flashplayer-qrb? → flashplayer-qrb+

Updated

9 years ago
Duplicate of this bug: 516595
You need to log in before you can comment on or make changes to this bug.