Index: lib/runtime/dart/_js_helper.js |
diff --git a/lib/runtime/dart/_js_helper.js b/lib/runtime/dart/_js_helper.js |
index 977407d40fd397404206155f4b86bb10d1123d37..aa9a7acfc5c0bc6971c52fc27d1431d44c86807a 100644 |
--- a/lib/runtime/dart/_js_helper.js |
+++ b/lib/runtime/dart/_js_helper.js |
@@ -41,12 +41,17 @@ var _js_helper; |
throw new core.UnsupportedError("Cannot modify unmodifiable Map"); |
} |
set(key, val) { |
+ dart.as(key, K); |
+ dart.as(val, V); |
return this[_throwUnmodifiable](); |
} |
putIfAbsent(key, ifAbsent) { |
+ dart.as(key, K); |
+ dart.as(ifAbsent, dart.functionType(V, [])); |
return dart.as(this[_throwUnmodifiable](), V); |
} |
remove(key) { |
+ dart.as(key, K); |
return dart.as(this[_throwUnmodifiable](), V); |
} |
clear() { |
@@ -73,6 +78,7 @@ var _js_helper; |
super._(); |
} |
containsValue(needle) { |
+ dart.as(needle, V); |
return this.values[core.$any](value => dart.equals(value, needle)); |
} |
containsKey(key) { |
@@ -113,6 +119,7 @@ var _js_helper; |
let ConstantProtoMap$ = dart.generic(function(K, V) { |
class ConstantProtoMap extends ConstantStringMap$(K, V) { |
_(length, jsObject, keys, protoValue) { |
+ dart.as(protoValue, V); |
this[_protoValue] = protoValue; |
super._(dart.as(length, core.int), jsObject, dart.as(keys, core.List$(K))); |
} |
@@ -164,6 +171,7 @@ var _js_helper; |
return this.$map; |
} |
containsValue(needle) { |
+ dart.as(needle, V); |
return this[_getMap]().containsValue(needle); |
} |
containsKey(key) { |