Chromium Code Reviews| Index: lib/src/protobuf/extension_field_set.dart |
| diff --git a/lib/src/protobuf/extension_field_set.dart b/lib/src/protobuf/extension_field_set.dart |
| index e2bbd27ef3a419115895137aad6a47bed39ca8a8..87782624bb8cfd910d7171abba1a762a54f95c39 100644 |
| --- a/lib/src/protobuf/extension_field_set.dart |
| +++ b/lib/src/protobuf/extension_field_set.dart |
| @@ -38,19 +38,19 @@ class _ExtensionFieldSet { |
| /// |
| /// If it doesn't exist, creates the list and saves the extension. |
| /// Suitable for public API and decoders. |
| - List _ensureRepeatedField(Extension fi) { |
| + List/*<T>*/ _ensureRepeatedField/*<T>*/(Extension/*<T>*/ fi) { |
| assert(fi.isRepeated); |
| assert(fi.extendee == _parent._messageName); |
| var list = _values[fi.tagNumber]; |
| - if (list != null) return list; |
| + if (list != null) return list as List/*<T>*/; |
|
Leaf
2016/04/01 17:09:56
Is this going to have the right dynamic type (and
skybrian
2016/04/01 18:01:40
It's not statically checkable but the intent is th
skybrian
2016/04/01 18:04:35
On second thought, maybe this doesn't work? I'm re
Leaf
2016/04/01 18:15:59
If PbList<T> implements or extends List<T>, then y
|
| // Add info and create list. |
| _validateInfo(fi); |
| - list = _parent._message.createRepeatedField(fi.tagNumber, fi); |
| + var newList = fi._createRepeatedField(_parent._message); |
| _addInfoUnchecked(fi); |
| - _setFieldUnchecked(fi, list); |
| - return list; |
| + _setFieldUnchecked(fi, newList); |
| + return newList; |
| } |
| _getFieldOrNull(Extension extension) => _values[extension.tagNumber]; |