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

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

Issue 1757343002: upgrade to latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 | « pubspec.yaml ('k') | test/codegen/expect/es6_modules.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/collection/src/canonicalized_map.js
diff --git a/test/codegen/expect/collection/src/canonicalized_map.js b/test/codegen/expect/collection/src/canonicalized_map.js
index e922aac6eec1c08913c5d6854d061065d1461f3b..7524a24b4ecba174e9ca9220898b696fba801077 100644
--- a/test/codegen/expect/collection/src/canonicalized_map.js
+++ b/test/codegen/expect/collection/src/canonicalized_map.js
@@ -42,7 +42,11 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
}
addAll(other) {
dart.as(other, core.Map$(K, V));
- other[dartx.forEach](dart.fn((key, value) => this.set(key, value), V, [K, V]));
+ other[dartx.forEach](dart.fn((key, value) => {
+ dart.as(key, K);
+ dart.as(value, V);
+ return this.set(key, value);
+ }, V, [K, V]));
}
clear() {
this[_base][dartx.clear]();
@@ -52,11 +56,18 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
return this[_base][dartx.containsKey](dart.dcall(this[_canonicalize], key));
}
containsValue(value) {
- return this[_base][dartx.values][dartx.any](dart.fn(pair => dart.equals(pair.last, value), core.bool, [utils.Pair$(K, V)]));
+ return this[_base][dartx.values][dartx.any](dart.fn(pair => {
+ dart.as(pair, utils.Pair$(K, V));
+ return dart.equals(pair.last, value);
+ }, core.bool, [utils.Pair$(K, V)]));
}
forEach(f) {
dart.as(f, dart.functionType(dart.void, [K, V]));
- this[_base][dartx.forEach](dart.fn((key, pair) => f(pair.first, pair.last), dart.void, [C, utils.Pair$(K, V)]));
+ this[_base][dartx.forEach](dart.fn((key, pair) => {
+ dart.as(key, C);
+ dart.as(pair, utils.Pair$(K, V));
+ return f(pair.first, pair.last);
+ }, dart.void, [C, utils.Pair$(K, V)]));
}
get isEmpty() {
return this[_base][dartx.isEmpty];
@@ -65,7 +76,10 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
return this[_base][dartx.isNotEmpty];
}
get keys() {
- return this[_base][dartx.values][dartx.map](dart.fn(pair => pair.first, K, [utils.Pair$(K, V)]));
+ return this[_base][dartx.values][dartx.map](dart.fn(pair => {
+ dart.as(pair, utils.Pair$(K, V));
+ return pair.first;
+ }, K, [utils.Pair$(K, V)]));
}
get length() {
return this[_base][dartx.length];
@@ -81,7 +95,10 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
return pair == null ? null : pair.last;
}
get values() {
- return this[_base][dartx.values][dartx.map](dart.fn(pair => pair.last, V, [utils.Pair$(K, V)]));
+ return this[_base][dartx.values][dartx.map](dart.fn(pair => {
+ dart.as(pair, utils.Pair$(K, V));
+ return pair.last;
+ }, V, [utils.Pair$(K, V)]));
}
toString() {
return collection.Maps.mapToString(this);
« no previous file with comments | « pubspec.yaml ('k') | test/codegen/expect/es6_modules.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698