| 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 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1618 } | 1618 } |
| 1619 if (type.paramReference != 0) { | 1619 if (type.paramReference != 0) { |
| 1620 return typeParameterContext.getTypeParameterType(type.paramReference); | 1620 return typeParameterContext.getTypeParameterType(type.paramReference); |
| 1621 } else if (type.syntheticReturnType != null) { | 1621 } else if (type.syntheticReturnType != null) { |
| 1622 FunctionElementImpl element = | 1622 FunctionElementImpl element = |
| 1623 new FunctionElementImpl_forLUB(unit, typeParameterContext, type); | 1623 new FunctionElementImpl_forLUB(unit, typeParameterContext, type); |
| 1624 return element.type; | 1624 return element.type; |
| 1625 } else { | 1625 } else { |
| 1626 DartType getTypeArgument(int i) { | 1626 DartType getTypeArgument(int i) { |
| 1627 if (i < type.typeArguments.length) { | 1627 if (i < type.typeArguments.length) { |
| 1628 return buildType(type.typeArguments[i], typeParameterContext); | 1628 return buildType(type.typeArguments[i], typeParameterContext, |
| 1629 declaredType: declaredType); |
| 1629 } else { | 1630 } else { |
| 1630 return DynamicTypeImpl.instance; | 1631 return DynamicTypeImpl.instance; |
| 1631 } | 1632 } |
| 1632 } | 1633 } |
| 1633 | 1634 |
| 1634 _ReferenceInfo referenceInfo = getReferenceInfo(type.reference); | 1635 _ReferenceInfo referenceInfo = getReferenceInfo(type.reference); |
| 1635 if (declaredType && !referenceInfo.isDeclarableType) { | 1636 if (declaredType && !referenceInfo.isDeclarableType) { |
| 1636 return DynamicTypeImpl.instance; | 1637 return DynamicTypeImpl.instance; |
| 1637 } | 1638 } |
| 1638 return referenceInfo.buildType( | 1639 return referenceInfo.buildType( |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 static String _getElementIdentifier(String name, ReferenceKind kind) { | 1917 static String _getElementIdentifier(String name, ReferenceKind kind) { |
| 1917 if (kind == ReferenceKind.topLevelPropertyAccessor || | 1918 if (kind == ReferenceKind.topLevelPropertyAccessor || |
| 1918 kind == ReferenceKind.propertyAccessor) { | 1919 kind == ReferenceKind.propertyAccessor) { |
| 1919 if (!name.endsWith('=')) { | 1920 if (!name.endsWith('=')) { |
| 1920 return name + '?'; | 1921 return name + '?'; |
| 1921 } | 1922 } |
| 1922 } | 1923 } |
| 1923 return name; | 1924 return name; |
| 1924 } | 1925 } |
| 1925 } | 1926 } |
| OLD | NEW |