- changed milestone to 1.2
- changed component to Base.Collections
- changed version to 1.1
IMultiMap ExtractValues wrong result type
Issue #144
closed
Instead of
IMultiMap<TKey, TValue> = interface(IMap<TKey, TValue>)
function ExtractValues(const key: TKey): IReadOnlyCollection<TKey>;
end;
it should be
IMultiMap<TKey, TValue> = interface(IMap<TKey, TValue>)
function ExtractValues(const key: TKey): IReadOnlyCollection<TValue>;
end;
And in TMultiMapBase it is wrong cast from ICollection<TValue> to ICollection<TKey>:
function TMultiMapBase<TKey, TValue>.ExtractValues(
const key: TKey): IReadOnlyCollection<TKey>;
var
list: ICollection<TValue>;
begin
...
Result := list as IReadOnlyCollection<TKey>;
end;
Comments (2)
-
repo owner -
repo owner - changed status to closed
This was already fixed for 1.2 in commit 5d3177e
- Log in to comment