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

Unified Diff: test/codegen/expect/collection/collection.js

Issue 959003003: Typecheck constructor initializers properly (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
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
Index: test/codegen/expect/collection/collection.js
diff --git a/test/codegen/expect/collection/collection.js b/test/codegen/expect/collection/collection.js
index 7286f23665d9eef1cc464f14801fe6b38d0cc894..44859ab92f74235ccd85be6f057b88cdb644e236 100644
--- a/test/codegen/expect/collection/collection.js
+++ b/test/codegen/expect/collection/collection.js
@@ -287,7 +287,7 @@ var collection;
_CustomHashMap(_equals, _hashCode, validKey) {
this._equals = _equals;
this._hashCode = _hashCode;
- this._validKey = validKey !== null ? validKey : (v) => dart.is(v, K);
+ this._validKey = dart.as(validKey !== null ? validKey : (v) => dart.is(v, K), _Predicate);
super._HashMap();
}
get(key) {
@@ -680,7 +680,7 @@ var collection;
_LinkedCustomHashMap(_equals, _hashCode, validKey) {
this._equals = _equals;
this._hashCode = _hashCode;
- this._validKey = validKey !== null ? validKey : (v) => dart.is(v, K);
+ this._validKey = dart.as(validKey !== null ? validKey : (v) => dart.is(v, K), _Predicate);
super._LinkedHashMap();
}
get(key) {
@@ -1045,7 +1045,7 @@ var collection;
_CustomHashSet(_equality, _hasher, validKey) {
this._equality = _equality;
this._hasher = _hasher;
- this._validKey = validKey !== null ? validKey : (x) => dart.is(x, E);
+ this._validKey = dart.as(validKey !== null ? validKey : (x) => dart.is(x, E), _Predicate);
super._HashSet();
}
_newSet() {
@@ -1413,7 +1413,7 @@ var collection;
_LinkedCustomHashSet(_equality, _hasher, validKey) {
this._equality = _equality;
this._hasher = _hasher;
- this._validKey = validKey !== null ? validKey : (x) => dart.is(x, E);
+ this._validKey = dart.as(validKey !== null ? validKey : (x) => dart.is(x, E), _Predicate);
super._LinkedHashSet();
}
_newSet() {
@@ -4216,8 +4216,8 @@ var collection;
compare = null;
if (isValidKey === void 0)
isValidKey = null;
- this._comparator = compare === null ? core.Comparable.compare : compare;
- this._validKey = isValidKey !== null ? isValidKey : (v) => dart.is(v, K);
+ this._comparator = dart.as(compare === null ? core.Comparable.compare : compare, core.Comparator);
+ this._validKey = dart.as(isValidKey !== null ? isValidKey : (v) => dart.is(v, K), _Predicate);
super._SplayTree();
}
SplayTreeMap$from(other, compare, isValidKey) {
@@ -4576,8 +4576,8 @@ var collection;
compare = null;
if (isValidKey === void 0)
isValidKey = null;
- this._comparator = compare === null ? core.Comparable.compare : compare;
- this._validKey = isValidKey !== null ? isValidKey : (v) => dart.is(v, E);
+ this._comparator = dart.as(compare === null ? core.Comparable.compare : compare, core.Comparator);
+ this._validKey = dart.as(isValidKey !== null ? isValidKey : (v) => dart.is(v, E), _Predicate);
super._SplayTree();
}
SplayTreeSet$from(elements, compare, isValidKey) {

Powered by Google App Engine
This is Rietveld 408576698