Index: lib/text/ast_to_text.dart |
diff --git a/lib/text/ast_to_text.dart b/lib/text/ast_to_text.dart |
index 55d6ebb8ada05996b594478b7f8b5909b5874585..9e9a093bb2b206a8b5415e8bc8ccc4974eafb88d 100644 |
--- a/lib/text/ast_to_text.dart |
+++ b/lib/text/ast_to_text.dart |
@@ -1391,10 +1391,7 @@ class Printer extends Visitor<Null> { |
writeComma(); |
} |
writeSymbol('{'); |
- writeList(node.namedParameters.keys, (name) { |
- writeType(node.namedParameters[name]); |
- writeWord(name); |
- }); |
+ writeList(node.namedParameters, visitNamedType); |
writeSymbol('}'); |
} |
writeSymbol(')'); |
@@ -1402,6 +1399,13 @@ class Printer extends Visitor<Null> { |
writeType(node.returnType); |
} |
+ visitNamedType(NamedType node) { |
+ writeWord(node.name); |
+ writeSymbol(':'); |
+ writeSpace(); |
+ writeType(node.type); |
+ } |
+ |
visitTypeParameterType(TypeParameterType node) { |
writeTypeParameterReference(node.parameter); |
} |