| Index: pkg/serialization/lib/src/basic_rule.dart
|
| diff --git a/pkg/serialization/lib/src/basic_rule.dart b/pkg/serialization/lib/src/basic_rule.dart
|
| index c989b2bdd3f189f0fba4c164e875107f655aa2fb..d8f1ebeb74bbaa3b13ee9ead9a9a6037e0da00f2 100644
|
| --- a/pkg/serialization/lib/src/basic_rule.dart
|
| +++ b/pkg/serialization/lib/src/basic_rule.dart
|
| @@ -533,13 +533,13 @@ class _FieldList extends Iterable {
|
|
|
| List get constructorFields => _constructorFields;
|
| List constructorFieldNames() =>
|
| - constructorFields.mappedBy((x) => x.name).toList();
|
| + constructorFields.map((x) => x.name).toList();
|
| List constructorFieldIndices() =>
|
| - constructorFields.mappedBy((x) => x.index).toList();
|
| + constructorFields.map((x) => x.index).toList();
|
| List regularFields() => contents.where((x) => !x.usedInConstructor).toList();
|
| - List regularFieldNames() => regularFields().mappedBy((x) => x.name).toList();
|
| + List regularFieldNames() => regularFields().map((x) => x.name).toList();
|
| List regularFieldIndices() =>
|
| - regularFields().mappedBy((x) => x.index).toList();
|
| + regularFields().map((x) => x.index).toList();
|
|
|
| /**
|
| * If we weren't given any non-constructor fields to use, figure out what
|
| @@ -549,7 +549,7 @@ class _FieldList extends Iterable {
|
| */
|
| void figureOutFields() {
|
| Iterable names(Iterable<DeclarationMirror> mirrors) =>
|
| - mirrors.mappedBy((each) => each.simpleName).toList();
|
| + mirrors.map((each) => each.simpleName).toList();
|
|
|
| if (!_shouldFigureOutFields || !regularFields().isEmpty) return;
|
| var fields = publicFields(mirror);
|
| @@ -606,7 +606,7 @@ class Constructor {
|
| */
|
| constructFrom(state, Reader r) {
|
| // TODO(alanknight): Handle named parameters
|
| - Collection inflated = fieldNumbers.mappedBy(
|
| + Iterable inflated = fieldNumbers.map(
|
| (x) => (x is int) ? reflect(r.inflateReference(state[x])) : reflect(x));
|
| var result = type.newInstance(name, inflated.toList());
|
| return deprecatedFutureValue(result);
|
|
|