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 4b0b529e0b8a9ccd12b9643a0baac9c11672d235..c989b2bdd3f189f0fba4c164e875107f655aa2fb 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.map((x) => x.name).toList(); |
+ constructorFields.mappedBy((x) => x.name).toList(); |
List constructorFieldIndices() => |
- constructorFields.map((x) => x.index).toList(); |
+ constructorFields.mappedBy((x) => x.index).toList(); |
List regularFields() => contents.where((x) => !x.usedInConstructor).toList(); |
- List regularFieldNames() => regularFields().map((x) => x.name).toList(); |
+ List regularFieldNames() => regularFields().mappedBy((x) => x.name).toList(); |
List regularFieldIndices() => |
- regularFields().map((x) => x.index).toList(); |
+ regularFields().mappedBy((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.map((each) => each.simpleName).toList(); |
+ mirrors.mappedBy((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.map( |
+ Collection inflated = fieldNumbers.mappedBy( |
(x) => (x is int) ? reflect(r.inflateReference(state[x])) : reflect(x)); |
var result = type.newInstance(name, inflated.toList()); |
return deprecatedFutureValue(result); |