Index: pkg/kernel/lib/ast.dart |
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart |
index 76c28cd75e0b694f9ecb2ea5eabbd89c73951e01..be31d44683f422878de898e67f0bb133699aba84 100644 |
--- a/pkg/kernel/lib/ast.dart |
+++ b/pkg/kernel/lib/ast.dart |
@@ -4143,6 +4143,9 @@ class FunctionType extends DartType { |
@informative |
final List<String> positionalParameterNames; |
+ /// The [Typedef] this function type is created for. |
+ Reference typedefReference; |
+ |
final DartType returnType; |
int _hashCode; |
@@ -4150,11 +4153,15 @@ class FunctionType extends DartType { |
{this.namedParameters: const <NamedType>[], |
this.typeParameters: const <TypeParameter>[], |
int requiredParameterCount, |
- this.positionalParameterNames: const <String>[]}) |
+ this.positionalParameterNames: const <String>[], |
+ this.typedefReference}) |
: this.positionalParameters = positionalParameters, |
this.requiredParameterCount = |
requiredParameterCount ?? positionalParameters.length; |
+ /// The [Typedef] this function type is created for. |
+ Typedef get typedef => typedefReference?.asTypedef; |
+ |
accept(DartTypeVisitor v) => v.visitFunctionType(this); |
visitChildren(Visitor v) { |