Index: pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart |
index 41130a9973689fdd0f4c497d5e99372d82dd1261..2b8a38e876d156ceabc00935afadefa2f43bda6c 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart |
@@ -123,7 +123,7 @@ _convertJsonToDartLazy(object) { |
return object; |
} |
-class _JsonMap implements LinkedHashMap { |
+class _JsonMap implements Map<String, dynamic> { |
// The original JavaScript object remains unchanged until |
// the map is eventually upgraded, in which case we null it |
// out to reclaim the memory used by it. |
@@ -156,7 +156,7 @@ class _JsonMap implements LinkedHashMap { |
bool get isEmpty => length == 0; |
bool get isNotEmpty => length > 0; |
- Iterable get keys { |
+ Iterable<String> get keys { |
if (_isUpgraded) return _upgradedMap.keys; |
return new _JsonMapKeyIterable(this); |
} |
@@ -181,7 +181,7 @@ class _JsonMap implements LinkedHashMap { |
} |
} |
- void addAll(Map other) { |
+ void addAll(Map<String, dynamic> other) { |
other.forEach((key, value) { |
this[key] = value; |
}); |
@@ -230,7 +230,7 @@ class _JsonMap implements LinkedHashMap { |
} |
} |
- void forEach(void f(key, value)) { |
+ void forEach(void f(String key, value)) { |
if (_isUpgraded) return _upgradedMap.forEach(f); |
List<String> keys = _computeKeys(); |
for (int i = 0; i < keys.length; i++) { |
@@ -263,7 +263,7 @@ class _JsonMap implements LinkedHashMap { |
bool get _isUpgraded => _processed == null; |
- Map get _upgradedMap { |
+ Map<String, dynamic> get _upgradedMap { |
assert(_isUpgraded); |
// 'cast' the union type to LinkedHashMap. It would be even better if we |
// could 'cast' to the implementation type, since LinkedHashMap includes |
@@ -280,12 +280,12 @@ class _JsonMap implements LinkedHashMap { |
return JS('JSExtendableArray', '#', keys); |
} |
- Map _upgrade() { |
+ Map<String, dynamic> _upgrade() { |
if (_isUpgraded) return _upgradedMap; |
// Copy all the (key, value) pairs to a freshly allocated |
// linked hash map thus preserving the ordering. |
- Map result = {}; |
+ var result = <String, dynamic>{}; |
List<String> keys = _computeKeys(); |
for (int i = 0; i < keys.length; i++) { |
String key = keys[i]; |
@@ -331,7 +331,7 @@ class _JsonMap implements LinkedHashMap { |
static _newJavaScriptObject() => JS('=Object', 'Object.create(null)'); |
} |
-class _JsonMapKeyIterable extends ListIterable { |
+class _JsonMapKeyIterable extends ListIterable<String> { |
final _JsonMap _parent; |
_JsonMapKeyIterable(this._parent); |
@@ -347,7 +347,7 @@ class _JsonMapKeyIterable extends ListIterable { |
/// Although [ListIterable] defines its own iterator, we return the iterator |
/// of the underlying list [_keys] in order to propagate |
/// [ConcurrentModificationError]s. |
- Iterator get iterator { |
+ Iterator<String> get iterator { |
return _parent._isUpgraded |
? _parent.keys.iterator |
: _parent._computeKeys().iterator; |
@@ -377,7 +377,7 @@ class _JsonDecoderSink extends _StringSinkConversionSink { |
final _Reviver _reviver; |
final Sink<Object> _sink; |
- _JsonDecoderSink(this._reviver, this._sink) : super(new StringBuffer()); |
+ _JsonDecoderSink(this._reviver, this._sink) : super(new StringBuffer('')); |
void close() { |
super.close(); |
@@ -393,9 +393,8 @@ class _JsonDecoderSink extends _StringSinkConversionSink { |
@patch |
class Utf8Decoder { |
@patch |
- Converter<List<int>, dynamic/*=T*/ > fuse/*<T>*/( |
- Converter<String, dynamic/*=T*/ > next) { |
- return super.fuse/*<T>*/(next); |
+ Converter<List<int>, T> fuse<T>(Converter<String, T> next) { |
+ return super.fuse(next); |
} |
// Currently not intercepting UTF8 decoding. |