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

Unified Diff: lib/runtime/dart/collection.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 | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/collection.js
diff --git a/lib/runtime/dart/collection.js b/lib/runtime/dart/collection.js
index d315fe2f42cab5b69de2a17a978e365e4f30f674..e9801b7124884e33e9d5fa032a120aef198ebafb 100644
--- a/lib/runtime/dart/collection.js
+++ b/lib/runtime/dart/collection.js
@@ -1363,7 +1363,10 @@ dart_library.library('dart/collection', null, /* Imports */[
}
addAll(entries) {
dart.as(entries, core.Iterable$(E));
- entries[dartx.forEach](dart.fn(entry => this[_insertAfter](this[_previous], entry), dart.void, [E]));
+ entries[dartx.forEach](dart.fn(entry => {
+ dart.as(entry, E);
+ return this[_insertAfter](this[_previous], entry);
+ }, dart.void, [E]));
}
remove(entry) {
dart.as(entry, E);
@@ -4055,7 +4058,10 @@ dart_library.library('dart/collection', null, /* Imports */[
return new (HashMapKeyIterable$(K))(this);
}
get values() {
- return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => this.get(each), V, [K]));
+ return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => {
+ dart.as(each, K);
+ return this.get(each);
+ }, V, [K]));
}
containsKey(key) {
if (dart.notNull(_HashMap$()._isStringKey(key))) {
@@ -4532,7 +4538,10 @@ dart_library.library('dart/collection', null, /* Imports */[
return new (LinkedHashMapKeyIterable$(K))(this);
}
get values() {
- return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => this.get(each), V, [K]));
+ return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => {
+ dart.as(each, K);
+ return this.get(each);
+ }, V, [K]));
}
containsKey(key) {
if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) {
@@ -4556,7 +4565,10 @@ dart_library.library('dart/collection', null, /* Imports */[
return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
}
containsValue(value) {
- return this.keys[dartx.any](dart.fn(each => dart.equals(this.get(each), value), core.bool, [K]));
+ return this.keys[dartx.any](dart.fn(each => {
+ dart.as(each, K);
+ return dart.equals(this.get(each), value);
+ }, core.bool, [K]));
}
addAll(other) {
dart.as(other, core.Map$(K, V));
« no previous file with comments | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698