| Index: lib/analyzer/ast_from_analyzer.dart
|
| diff --git a/lib/analyzer/ast_from_analyzer.dart b/lib/analyzer/ast_from_analyzer.dart
|
| index 7dfba0d46ba7b83f20852efd4d1715f6ceb319ce..5aebe1eb61df389a6c5f2f0f17d6bf27495f3f51 100644
|
| --- a/lib/analyzer/ast_from_analyzer.dart
|
| +++ b/lib/analyzer/ast_from_analyzer.dart
|
| @@ -456,6 +456,9 @@ class TypeScope extends ReferenceScope {
|
| break;
|
| }
|
| }
|
| + if (named.isNotEmpty) {
|
| + named.sort();
|
| + }
|
| var returnType = element is ConstructorElement
|
| ? const ast.VoidType()
|
| : buildType(element.returnType);
|
| @@ -557,6 +560,9 @@ class ExpressionScope extends TypeScope {
|
| break;
|
| }
|
| }
|
| + if (named.isNotEmpty) {
|
| + named.sort();
|
| + }
|
| return new ast.FunctionNode(buildOptionalFunctionBody(body),
|
| typeParameters: typeParameters,
|
| positionalParameters: positional,
|
| @@ -2150,13 +2156,14 @@ class TypeAnnotationBuilder extends GeneralizingAstVisitor<ast.DartType> {
|
| return types.map((t) => convertType(t, boundVariables)).toList();
|
| }
|
|
|
| - Map<String, ast.DartType> convertTypeMap(
|
| + List<ast.NamedType> convertTypeMap(
|
| Map<String, DartType> types, List<TypeParameterElement> boundVariables) {
|
| - if (types.isEmpty) return const <String, ast.DartType>{};
|
| - var result = <String, ast.DartType>{};
|
| + if (types.isEmpty) return const <ast.NamedType>[];
|
| + List<ast.NamedType> result = <ast.NamedType>[];
|
| types.forEach((name, type) {
|
| - result[name] = convertType(type, boundVariables);
|
| + result.add(new ast.NamedType(name, convertType(type, boundVariables)));
|
| });
|
| + result.sort();
|
| return result;
|
| }
|
|
|
|
|