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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/handle.dart
diff --git a/pkg/analyzer/lib/src/dart/element/handle.dart b/pkg/analyzer/lib/src/dart/element/handle.dart
index e38f5fefd7bdb3862777918478edd54cf45f33ca..4b285cc9737f9cc5c20522fd465fe11b655d56ba 100644
--- a/pkg/analyzer/lib/src/dart/element/handle.dart
+++ b/pkg/analyzer/lib/src/dart/element/handle.dart
@@ -670,6 +670,45 @@ class FunctionTypeAliasElementHandle extends ElementHandle
}
/**
+ * A handle to a [GenericTypeAliasElement].
+ */
+class GenericTypeAliasElementHandle extends ElementHandle
+ implements GenericTypeAliasElement {
+ GenericTypeAliasElementHandle(
+ ElementResynthesizer resynthesizer, ElementLocation location)
+ : super(resynthesizer, location);
+
+ @override
+ GenericTypeAliasElement get actualElement =>
+ super.actualElement as GenericTypeAliasElement;
+
+ @override
+ CompilationUnitElement get enclosingElement =>
+ super.enclosingElement as CompilationUnitElement;
+
+ @override
+ GenericFunctionTypeElement get function => actualElement.function;
+
+ @override
+ ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
+
+ @override
+ List<ParameterElement> get parameters => actualElement.parameters;
+
+ @override
+ DartType get returnType => actualElement.returnType;
+
+ @override
+ FunctionType get type => actualElement.type;
+
+ @override
+ List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
+
+ @override
+ FunctionTypeAlias computeNode() => actualElement.computeNode();
+}
+
+/**
* A handle to an [ImportElement].
*/
class ImportElementHandle extends ElementHandle implements ImportElement {
« 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