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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/handle.dart

Issue 2814443005: Fix for summarization of generic function type aliases and support for resynthesizing. (Closed)
Patch Set: Created 3 years, 8 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.generated.element_handle; 5 library analyzer.src.generated.element_handle;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/constant/value.dart'; 8 import 'package:analyzer/dart/constant/value.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 FunctionType get type => actualElement.type; 663 FunctionType get type => actualElement.type;
664 664
665 @override 665 @override
666 List<TypeParameterElement> get typeParameters => actualElement.typeParameters; 666 List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
667 667
668 @override 668 @override
669 FunctionTypeAlias computeNode() => actualElement.computeNode(); 669 FunctionTypeAlias computeNode() => actualElement.computeNode();
670 } 670 }
671 671
672 /** 672 /**
673 * A handle to a [GenericTypeAliasElement].
674 */
675 class GenericTypeAliasElementHandle extends ElementHandle
676 implements GenericTypeAliasElement {
677 GenericTypeAliasElementHandle(
678 ElementResynthesizer resynthesizer, ElementLocation location)
679 : super(resynthesizer, location);
680
681 @override
682 GenericTypeAliasElement get actualElement =>
683 super.actualElement as GenericTypeAliasElement;
684
685 @override
686 CompilationUnitElement get enclosingElement =>
687 super.enclosingElement as CompilationUnitElement;
688
689 @override
690 GenericFunctionTypeElement get function => actualElement.function;
691
692 @override
693 ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
694
695 @override
696 List<ParameterElement> get parameters => actualElement.parameters;
697
698 @override
699 DartType get returnType => actualElement.returnType;
700
701 @override
702 FunctionType get type => actualElement.type;
703
704 @override
705 List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
706
707 @override
708 FunctionTypeAlias computeNode() => actualElement.computeNode();
709 }
710
711 /**
673 * A handle to an [ImportElement]. 712 * A handle to an [ImportElement].
674 */ 713 */
675 class ImportElementHandle extends ElementHandle implements ImportElement { 714 class ImportElementHandle extends ElementHandle implements ImportElement {
676 /** 715 /**
677 * Initialize a newly created element handle to represent the element at the 716 * Initialize a newly created element handle to represent the element at the
678 * given [_location]. The [_resynthesizer] will be used to resynthesize the 717 * given [_location]. The [_resynthesizer] will be used to resynthesize the
679 * element when needed. 718 * element when needed.
680 */ 719 */
681 ImportElementHandle( 720 ImportElementHandle(
682 ElementResynthesizer resynthesizer, ElementLocation location) 721 ElementResynthesizer resynthesizer, ElementLocation location)
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 1162
1124 @override 1163 @override
1125 bool get isStatic => actualElement.isStatic; 1164 bool get isStatic => actualElement.isStatic;
1126 1165
1127 @override 1166 @override
1128 DartType get type => actualElement.type; 1167 DartType get type => actualElement.type;
1129 1168
1130 @override 1169 @override
1131 DartObject computeConstantValue() => actualElement.computeConstantValue(); 1170 DartObject computeConstantValue() => actualElement.computeConstantValue();
1132 } 1171 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698