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

Unified Diff: tool/input_sdk/patch/collection_patch.dart

Issue 1122313002: Typing fixes to eliminate casts/dcalls (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 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 | « tool/input_sdk/lib/collection/splay_tree.dart ('k') | tool/input_sdk/patch/core_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/patch/collection_patch.dart
diff --git a/tool/input_sdk/patch/collection_patch.dart b/tool/input_sdk/patch/collection_patch.dart
index 184e8ce0406dc712fdce761171c144e1d95e7270..c06f55287fa27ca6a9a528bb78ee00ad1017680a 100644
--- a/tool/input_sdk/patch/collection_patch.dart
+++ b/tool/input_sdk/patch/collection_patch.dart
@@ -12,7 +12,7 @@ class HashMap<K, V> {
@patch
factory HashMap({ bool equals(K key1, K key2),
int hashCode(K key),
- bool isValidKey(potentialKey) }) {
+ bool isValidKey(Object potentialKey) }) {
if (isValidKey == null) {
if (hashCode == null) {
if (equals == null) {
@@ -384,8 +384,9 @@ class _IdentityHashMap<K, V> extends _HashMap<K, V> {
class _CustomHashMap<K, V> extends _HashMap<K, V> {
final _Equality<K> _equals;
final _Hasher<K> _hashCode;
- final _Predicate _validKey;
- _CustomHashMap(this._equals, this._hashCode, bool validKey(potentialKey))
+ final _Predicate<Object> _validKey;
+ _CustomHashMap(this._equals, this._hashCode,
+ bool validKey(Object potentialKey))
: _validKey = (validKey != null) ? validKey : ((v) => v is K);
V operator[](Object key) {
@@ -487,7 +488,7 @@ class LinkedHashMap<K, V> {
@patch
factory LinkedHashMap({ bool equals(K key1, K key2),
int hashCode(K key),
- bool isValidKey(potentialKey) }) {
+ bool isValidKey(Object potentialKey) }) {
if (isValidKey == null) {
if (hashCode == null) {
if (equals == null) {
@@ -859,9 +860,9 @@ class _LinkedIdentityHashMap<K, V> extends _LinkedHashMap<K, V> {
class _LinkedCustomHashMap<K, V> extends _LinkedHashMap<K, V> {
final _Equality<K> _equals;
final _Hasher<K> _hashCode;
- final _Predicate _validKey;
+ final _Predicate<Object> _validKey;
_LinkedCustomHashMap(this._equals, this._hashCode,
- bool validKey(potentialKey))
+ bool validKey(Object potentialKey))
: _validKey = (validKey != null) ? validKey : ((v) => v is K);
V operator[](Object key) {
@@ -971,7 +972,7 @@ class HashSet<E> {
@patch
factory HashSet({ bool equals(E e1, E e2),
int hashCode(E e),
- bool isValidKey(potentialKey) }) {
+ bool isValidKey(Object potentialKey) }) {
if (isValidKey == null) {
if (hashCode == null) {
if (equals == null) {
@@ -1300,8 +1301,9 @@ class _IdentityHashSet<E> extends _HashSet<E> {
class _CustomHashSet<E> extends _HashSet<E> {
_Equality<E> _equality;
_Hasher<E> _hasher;
- _Predicate _validKey;
- _CustomHashSet(this._equality, this._hasher, bool validKey(potentialKey))
+ _Predicate<Object> _validKey;
+ _CustomHashSet(this._equality, this._hasher,
+ bool validKey(Object potentialKey))
: _validKey = (validKey != null) ? validKey : ((x) => x is E);
Set<E> _newSet() => new _CustomHashSet<E>(_equality, _hasher, _validKey);
@@ -1376,7 +1378,7 @@ class LinkedHashSet<E> {
@patch
factory LinkedHashSet({ bool equals(E e1, E e2),
int hashCode(E e),
- bool isValidKey(potentialKey) }) {
+ bool isValidKey(Object potentialKey) }) {
if (isValidKey == null) {
if (hashCode == null) {
if (equals == null) {
@@ -1742,9 +1744,9 @@ class _LinkedIdentityHashSet<E> extends _LinkedHashSet<E> {
class _LinkedCustomHashSet<E> extends _LinkedHashSet<E> {
_Equality<E> _equality;
_Hasher<E> _hasher;
- _Predicate _validKey;
+ _Predicate<Object> _validKey;
_LinkedCustomHashSet(this._equality, this._hasher,
- bool validKey(potentialKey))
+ bool validKey(Object potentialKey))
: _validKey = (validKey != null) ? validKey : ((x) => x is E);
Set<E> _newSet() =>
« no previous file with comments | « tool/input_sdk/lib/collection/splay_tree.dart ('k') | tool/input_sdk/patch/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698