Tuples don't have equals and hashCode defined
Brought to you by:
bonniot
- therefore they don't work if you use them as keys in
a HashMap (thats how I ran into it). Example:
package bug;
void main(String[] args){
let a = new HashMap();
a.put((1,2),10);
println(a);
println(a.get((1,2)));
}
prints
{[Ljava.lang.Object;@19821f=10}
null
Apparently tuples are implemented with arrays. If it is
too much trouble or isn't worth it to change it from
being arrays to a specialized object, it should be
clearer that they are just arrays.