Index: lib/binary/ast_to_binary.dart |
diff --git a/lib/binary/ast_to_binary.dart b/lib/binary/ast_to_binary.dart |
index 4e05ca45adedc678cf0fbd898219caf7502e6655..2a451ed7ba0dd0fa88cefaf1cedc635975acc961 100644 |
--- a/lib/binary/ast_to_binary.dart |
+++ b/lib/binary/ast_to_binary.dart |
@@ -893,15 +893,17 @@ class BinaryPrinter extends Visitor { |
writeNodeList(node.typeParameters); |
writeUInt30(node.requiredParameterCount); |
writeNodeList(node.positionalParameters); |
- writeList(node.namedParameters.keys.toList(), (String name) { |
- writeStringReference(name); |
- writeNode(node.namedParameters[name]); |
- }); |
+ writeNodeList(node.namedParameters); |
writeNode(node.returnType); |
_typeParameterIndexer.pop(node.typeParameters); |
} |
} |
+ visitNamedType(NamedType node) { |
+ writeStringReference(node.name); |
+ writeNode(node.type); |
+ } |
+ |
visitTypeParameterType(TypeParameterType node) { |
writeByte(Tag.TypeParameterType); |
writeUInt30(_typeParameterIndexer[node.parameter]); |
@@ -1139,8 +1141,8 @@ class StringIndexer extends RecursiveVisitor<Null> { |
node.visitChildren(this); |
} |
- visitFunctionType(FunctionType node) { |
- node.namedParameters.keys.forEach(put); |
+ visitNamedType(NamedType node) { |
+ put(node.name); |
node.visitChildren(this); |
} |