Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 2849893002: Set 'enclosingElement' for FunctionElementImpl_forLUB. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 } 1681 }
1682 } 1682 }
1683 if (type.paramReference != 0) { 1683 if (type.paramReference != 0) {
1684 return context.typeParameterContext 1684 return context.typeParameterContext
1685 .getTypeParameterType(type.paramReference); 1685 .getTypeParameterType(type.paramReference);
1686 } else if (type.entityKind == EntityRefKind.genericFunctionType) { 1686 } else if (type.entityKind == EntityRefKind.genericFunctionType) {
1687 GenericFunctionTypeElement element = 1687 GenericFunctionTypeElement element =
1688 new GenericFunctionTypeElementImpl.forSerialized(context, type); 1688 new GenericFunctionTypeElementImpl.forSerialized(context, type);
1689 return element.type; 1689 return element.type;
1690 } else if (type.syntheticReturnType != null) { 1690 } else if (type.syntheticReturnType != null) {
1691 FunctionElementImpl element = new FunctionElementImpl_forLUB( 1691 FunctionElementImpl element =
1692 unit, context.typeParameterContext, type); 1692 new FunctionElementImpl_forLUB(context, type);
1693 return element.type; 1693 return element.type;
1694 } else { 1694 } else {
1695 DartType getTypeArgument(int i) { 1695 DartType getTypeArgument(int i) {
1696 if (i < type.typeArguments.length) { 1696 if (i < type.typeArguments.length) {
1697 return buildType(context, type.typeArguments[i], 1697 return buildType(context, type.typeArguments[i],
1698 declaredType: declaredType); 1698 declaredType: declaredType);
1699 } else { 1699 } else {
1700 return DynamicTypeImpl.instance; 1700 return DynamicTypeImpl.instance;
1701 } 1701 }
1702 } 1702 }
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 static String _getElementIdentifier(String name, ReferenceKind kind) { 2012 static String _getElementIdentifier(String name, ReferenceKind kind) {
2013 if (kind == ReferenceKind.topLevelPropertyAccessor || 2013 if (kind == ReferenceKind.topLevelPropertyAccessor ||
2014 kind == ReferenceKind.propertyAccessor) { 2014 kind == ReferenceKind.propertyAccessor) {
2015 if (!name.endsWith('=')) { 2015 if (!name.endsWith('=')) {
2016 return name + '?'; 2016 return name + '?';
2017 } 2017 }
2018 } 2018 }
2019 return name; 2019 return name;
2020 } 2020 }
2021 } 2021 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698