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 3e1e9ab14bfea214dd4a444f1b1d725e8bc8cd82..03744bc169ca52cb1f9dae9898e42e2c3e091135 100644 |
--- a/test/codegen/expect/collection/src/canonicalized_map.js |
+++ b/test/codegen/expect/collection/src/canonicalized_map.js |
@@ -32,9 +32,12 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[ |
return pair == null ? null : pair.last; |
} |
set(key, value) { |
- dart.as(key, K); |
- dart.as(value, V); |
- this[_base].set(dart.as(dart.dcall(this[_canonicalize], key), C), new (utils.Pair$(K, V))(key, value)); |
+ (() => { |
+ dart.as(key, K); |
+ dart.as(value, V); |
+ if (!dart.notNull(this[_isValidKey](key))) return; |
+ this[_base].set(dart.as(dart.dcall(this[_canonicalize], key), C), new (utils.Pair$(K, V))(key, value)); |
+ })(); |
return value; |
} |
addAll(other) { |
@@ -62,7 +65,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[ |
return this[_base].isNotEmpty; |
} |
get keys() { |
- return dart.as(this[_base].values[dartx.map](dart.fn(pair => pair.first, K, [utils.Pair$(K, V)])), core.Iterable$(K)); |
+ return this[_base].values[dartx.map](dart.fn(pair => pair.first, K, [utils.Pair$(K, V)])); |
} |
get length() { |
return this[_base].length; |
@@ -78,7 +81,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[ |
return pair == null ? null : pair.last; |
} |
get values() { |
- return dart.as(this[_base].values[dartx.map](dart.fn(pair => pair.last, V, [utils.Pair$(K, V)])), core.Iterable$(V)); |
+ return this[_base].values[dartx.map](dart.fn(pair => pair.last, V, [utils.Pair$(K, V)])); |
} |
toString() { |
return collection.Maps.mapToString(this); |