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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.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/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
index f8c928d71fca40d3834266ce3e85311abbe1aad9..eeb4bad231c2e1dbb01cb2a91171d628848d21ce 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
@@ -61,14 +61,19 @@ class KernelFunctionTypeAliasBuilder
return thisType;
}
thisType = const InvalidType();
- DartType builtType = type?.build(library) ?? const DynamicType();
- if (typeVariables != null) {
- for (KernelTypeVariableBuilder tv in typeVariables) {
- tv.parameter.bound = tv?.bound?.build(library);
- target.typeParameters.add(tv.parameter..parent = target);
+ FunctionType builtType = type?.build(library);
+ if (builtType != null) {
+ builtType.typedefReference = target.reference;
+ if (typeVariables != null) {
+ for (KernelTypeVariableBuilder tv in typeVariables) {
+ tv.parameter.bound = tv?.bound?.build(library);
+ target.typeParameters.add(tv.parameter..parent = target);
+ }
}
+ return thisType = builtType;
+ } else {
+ return thisType = const DynamicType();
}
- return thisType = builtType;
}
/// [arguments] have already been built.

Powered by Google App Engine
This is Rietveld 408576698