Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortedMap should make use of covariant return types. #10

Closed
michaelamaura opened this issue Jul 1, 2019 · 2 comments
Closed

SortedMap should make use of covariant return types. #10

michaelamaura opened this issue Jul 1, 2019 · 2 comments

Comments

@michaelamaura
Copy link

The following methods should have their return type adapted.

  • SortedMap#remove(K) should return SortedMap<K, V>
  • SortedMap#put(K, V) should return SortedMap<K, V>
  • SortedMap#put(K, V, BinaryOperator) should return SortedMap<K, V>

Currently they always need to be re-casted to (SortedMap(K, V)) which makes the code a bit ugly.

@ztellman
Copy link
Member

ztellman commented Jul 3, 2019

Thanks, the library is due for a rev, so I’ll fix this and do a release.

@ztellman
Copy link
Member

ztellman commented Jul 6, 2019

Fixed in 0.2.0-alpha1

@ztellman ztellman closed this as completed Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants