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 ea5bfdba3b80f1afdd05d7141ea4c52629717612..f8c928d71fca40d3834266ce3e85311abbe1aad9 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 |
@@ -15,6 +15,8 @@ import 'package:kernel/ast.dart' |
import 'package:kernel/type_algebra.dart' show substitute; |
+import '../fasta_codes.dart' show templateCyclicTypedef; |
+ |
import 'kernel_builder.dart' |
show |
FunctionTypeAliasBuilder, |
@@ -52,8 +54,8 @@ class KernelFunctionTypeAliasBuilder |
DartType buildThisType(LibraryBuilder library) { |
if (thisType != null) { |
if (const InvalidType() == thisType) { |
- library.deprecated_addCompileTimeError( |
- charOffset, "The typedef '$name' has a reference to itself."); |
+ library.addCompileTimeError( |
+ templateCyclicTypedef.withArguments(name), charOffset, fileUri); |
return const DynamicType(); |
} |
return thisType; |