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

Side by Side Diff: runtime/lib/collection_patch.dart

Issue 35543006: Fix type errors detected with --error-on-bad-type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 patch class HashMap<K, V> { 5 patch class HashMap<K, V> {
6 /* patch */ factory HashMap({ bool equals(K key1, K key2), 6 /* patch */ factory HashMap({ bool equals(K key1, K key2),
7 int hashCode(K key), 7 int hashCode(K key),
8 bool isValidKey(potentialKey) }) { 8 bool isValidKey(potentialKey) }) {
9 if (isValidKey == null) { 9 if (isValidKey == null) {
10 if (hashCode == null) { 10 if (hashCode == null) {
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 bool contains(Object key) => _map.containsKey(key); 838 bool contains(Object key) => _map.containsKey(key);
839 bool get isEmpty => _map.isEmpty; 839 bool get isEmpty => _map.isEmpty;
840 bool get isNotEmpty => _map.isNotEmpty; 840 bool get isNotEmpty => _map.isNotEmpty;
841 int get length => _map.length; 841 int get length => _map.length;
842 } 842 }
843 843
844 class _LinkedHashMapValueIterable<V> extends IterableBase<V> 844 class _LinkedHashMapValueIterable<V> extends IterableBase<V>
845 implements EfficientLength { 845 implements EfficientLength {
846 LinkedHashMap<dynamic, V> _map; 846 LinkedHashMap<dynamic, V> _map;
847 _LinkedHashMapValueIterable(this._map); 847 _LinkedHashMapValueIterable(this._map);
848 Iterator<K> get iterator => new _LinkedHashMapValueIterator<V>(_map); 848 Iterator<V> get iterator => new _LinkedHashMapValueIterator<V>(_map);
849 bool contains(Object value) => _map.containsValue(value); 849 bool contains(Object value) => _map.containsValue(value);
850 bool get isEmpty => _map.isEmpty; 850 bool get isEmpty => _map.isEmpty;
851 bool get isNotEmpty => _map.isNotEmpty; 851 bool get isNotEmpty => _map.isNotEmpty;
852 int get length => _map.length; 852 int get length => _map.length;
853 } 853 }
854 854
855 abstract class _LinkedHashMapIterator<T> implements Iterator<T> { 855 abstract class _LinkedHashMapIterator<T> implements Iterator<T> {
856 final LinkedHashMap _map; 856 final LinkedHashMap _map;
857 var _next; 857 var _next;
858 T _current; 858 T _current;
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 return false; 1253 return false;
1254 } 1254 }
1255 _LinkedHashSetEntry entry = _next; 1255 _LinkedHashSetEntry entry = _next;
1256 _current = entry.key; 1256 _current = entry.key;
1257 _next = entry._nextEntry; 1257 _next = entry._nextEntry;
1258 return true; 1258 return true;
1259 } 1259 }
1260 1260
1261 E get current => _current; 1261 E get current => _current;
1262 } 1262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698