Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Map.keys of type Set, fixing #6063
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Mar 2, 2016
1 parent 4384671 commit b87e569
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions language/src/ceylon/language/Map.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@ shared interface Map<out Key=Object, out Item=Anything>
entries in this map change."
shared actual formal Map<Key,Item> clone();

"A [[Collection]] containing the keys of this map."
shared actual default Collection<Key> keys
=> object satisfies Collection<Key> {
"A [[Set]] containing the keys of this map."
shared actual default Set<Key> keys
=> object extends Object() satisfies Set<Key> {
contains(Object key) => outer.defines(key);
iterator() => outer.map(Entry.key).iterator();
clone() => [*this];
size => outer.size;
empty => outer.empty;
clone() => set(this);
};

"A [[Collection]] containing the items stored in this
Expand Down

0 comments on commit b87e569

Please sign in to comment.