Skip to content

The return type of TreeMap should be Iterator<MapEntry<K, V>> #69

@cnyarx

Description

@cnyarx

In TreeMap's [Symbol.iterator]:
public [Symbol.iterator] ():Iterator<K> { return this.entrySet[Symbol.iterator](); }

The type of this.entrySet is a function, not an object of ImmutableEntrySetForTreeMap. So I think it should be defined like this:

public [Symbol.iterator]():Iterator<MapEntry<K, V>> { return this.entrySet()[Symbol.iterator](); }

Or there will get a ts(7053) error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions