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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart

Issue 2965393002: Use FastaMessage instead of String. Part 1. (Closed)
Patch Set: Add type variable to Code. Created 3 years, 5 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 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;

Powered by Google App Engine
This is Rietveld 408576698