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

Unified Diff: pkg/kernel/lib/ast.dart

Issue 2986393002: Record Typedef reference into Kernel FunctionType and resynthesyze typedefs in Analyzer. (Closed)
Patch Set: Drop @informative for typedefReference. Created 3 years, 4 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
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) {
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698