-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fixes the strong-mode analysis errors. #290
Conversation
@@ -438,7 +436,7 @@ class AvlTreeSet<V> extends TreeSet<V> { | |||
} | |||
|
|||
bool remove(Object item) { | |||
AvlNode<V> x = _getNode(item); | |||
AvlNode<V> x = _getNode(item as V); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will throw if item is not a V, is this the intended behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_getNode
feeds item
into comparator
, which is generic and demands a V
. I would therefore go further and make item
parameter V
rather than Object
.
@cbracken What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, nvm, we are implementing Iterable
. In that case we can probably do this:
if (item is! V) {
return false;
}
...
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
CLAs look good, thanks! |
Have just rebased to current master. |
This fixes issues #285 and #286
Ran all tests, all tests pass (except the one reported in #287).
SDK used: 1.16.0-dev.3.0