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 a4f614ff31f2db8fb06e63c43d7a787b10210300..1d3c0dbe59ce66950dcc499a772c29d79ee4f80f 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,7 +15,6 @@ import 'package:kernel/ast.dart' |
import 'package:kernel/type_algebra.dart' show substitute; |
-import '../messages.dart' show warning; |
import 'kernel_builder.dart' |
show |
FormalParameterBuilder, |
@@ -58,9 +57,8 @@ class KernelFunctionTypeAliasBuilder |
if (thisType != null) { |
if (thisType == const InvalidType()) { |
thisType = const DynamicType(); |
- // TODO(ahe): Build an error somehow. |
- warning( |
- parent.uri, -1, "The typedef '$name' has a reference to itself."); |
+ library.addCompileTimeError( |
+ charOffset, "The typedef '$name' has a reference to itself."); |
} |
return thisType; |
} |