| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; | 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; |
| (...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 return DynamicTypeImpl.instance; | 1648 return DynamicTypeImpl.instance; |
| 1649 } | 1649 } |
| 1650 } | 1650 } |
| 1651 if (type.paramReference != 0) { | 1651 if (type.paramReference != 0) { |
| 1652 return context.typeParameterContext | 1652 return context.typeParameterContext |
| 1653 .getTypeParameterType(type.paramReference); | 1653 .getTypeParameterType(type.paramReference); |
| 1654 } else if (type.entityKind == EntityRefKind.genericFunctionType) { | 1654 } else if (type.entityKind == EntityRefKind.genericFunctionType) { |
| 1655 GenericFunctionTypeElement element = | 1655 GenericFunctionTypeElement element = |
| 1656 new GenericFunctionTypeElementImpl.forSerialized(context, type); | 1656 new GenericFunctionTypeElementImpl.forSerialized(context, type); |
| 1657 return element.type; | 1657 return element.type; |
| 1658 } else if (type.syntheticReturnType != null) { | 1658 } else if (type.syntheticReturnType != null && type.reference == 0) { |
| 1659 FunctionElementImpl element = | 1659 FunctionElementImpl element = |
| 1660 new FunctionElementImpl_forLUB(context, type); | 1660 new FunctionElementImpl_forLUB(context, type); |
| 1661 return element.type; | 1661 return element.type; |
| 1662 } else { | 1662 } else { |
| 1663 DartType getTypeArgument(int i) { | 1663 DartType getTypeArgument(int i) { |
| 1664 if (i < type.typeArguments.length) { | 1664 if (i < type.typeArguments.length) { |
| 1665 return buildType(context, type.typeArguments[i], | 1665 return buildType(context, type.typeArguments[i], |
| 1666 declaredType: declaredType); | 1666 declaredType: declaredType); |
| 1667 } else { | 1667 } else { |
| 1668 return DynamicTypeImpl.instance; | 1668 return DynamicTypeImpl.instance; |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 static String _getElementIdentifier(String name, ReferenceKind kind) { | 1971 static String _getElementIdentifier(String name, ReferenceKind kind) { |
| 1972 if (kind == ReferenceKind.topLevelPropertyAccessor || | 1972 if (kind == ReferenceKind.topLevelPropertyAccessor || |
| 1973 kind == ReferenceKind.propertyAccessor) { | 1973 kind == ReferenceKind.propertyAccessor) { |
| 1974 if (!name.endsWith('=')) { | 1974 if (!name.endsWith('=')) { |
| 1975 return name + '?'; | 1975 return name + '?'; |
| 1976 } | 1976 } |
| 1977 } | 1977 } |
| 1978 return name; | 1978 return name; |
| 1979 } | 1979 } |
| 1980 } | 1980 } |
| OLD | NEW |