Index: lib/binary/ast_from_binary.dart |
diff --git a/lib/binary/ast_from_binary.dart b/lib/binary/ast_from_binary.dart |
index bbad877591cf1b1e3a6bb434a5f6e64d7c7c3eba..1b228b80d8c6c37596bff46c4b338f72f2159778 100644 |
--- a/lib/binary/ast_from_binary.dart |
+++ b/lib/binary/ast_from_binary.dart |
@@ -816,6 +816,14 @@ class BinaryBuilder { |
return new List<DartType>.generate(readUInt(), (i) => readDartType()); |
} |
+ List<NamedType> readNamedTypeList() { |
+ return new List<NamedType>.generate(readUInt(), (i) => readNamedType()); |
+ } |
+ |
+ NamedType readNamedType() { |
+ return new NamedType(readStringReference(), readDartType()); |
+ } |
+ |
DartType readDartTypeOption() { |
return readAndCheckOptionTag() ? readDartType() : null; |
} |
@@ -840,13 +848,7 @@ class BinaryBuilder { |
var typeParameters = readAndPushTypeParameterList(); |
var requiredParameterCount = readUInt(); |
var positional = readDartTypeList(); |
- int namedParameterCount = readUInt(); |
- var named = <String, DartType>{}; |
- for (int i = 0; i < namedParameterCount; ++i) { |
- var name = readStringReference(); |
- var type = readDartType(); |
- named[name] = type; |
- } |
+ var named = readNamedTypeList(); |
var returnType = readDartType(); |
typeParameterStack.length = typeParameterStackHeight; |
return new FunctionType(positional, returnType, |