Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: runtime/lib/compact_hash.dart

Issue 971833002: Correct typing of LinkedHashSet.add. Add unit test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/corelib/hash_set_type_check_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/compact_hash.dart
===================================================================
--- runtime/lib/compact_hash.dart (revision 44128)
+++ runtime/lib/compact_hash.dart (working copy)
@@ -337,7 +337,7 @@
// Set implementation, analogous to _CompactLinkedHashMap.
class _CompactLinkedHashSet<K>
extends SetBase<K> with _HashBase
- implements HashSet<K>, LinkedHashSet<K> {
+ implements LinkedHashSet<K> {
_CompactLinkedHashSet() {
assert(_HashBase._UNUSED_PAIR == 0);
@@ -377,7 +377,7 @@
}
}
- bool add(Object key) {
+ bool add(K key) {
final int size = _index.length;
final int sizeMask = size - 1;
final int maxEntries = size >> 1;
« no previous file with comments | « no previous file | tests/corelib/hash_set_type_check_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698