Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #2027 (closed defect: invalid)

Opened 13 years ago

Last modified 13 years ago

opIndexAssign definition in tango.util.container.HashMap and ..SortedMap

Reported by: bleser Assigned to: community
Priority: major Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: Cc:

Description

I think the opIndexAssign is not logical defined I would expect the key is the index and not the value. Example

auto map=new HashMap?!(char[], int);

// I expect this mapsome_hash_text?=10; // HashMap? and SortedMap? expect the value to be the index it is defined as bool opIndexAssign(V element, K key) I think it should be opIndexAssign(K key, V element) // opIndex is defined as V opIndex(K key)

// Note I would also expect that opIndexAssign return the V element add and null if element is not added instead of a boolean. (This in not a big deal but this make it more compatible with standard hash i D)

Change History

01/16/11 19:20:23 changed by kris

  • status changed from new to closed.
  • resolution set to invalid.

this is dictated by the compiler