Index: pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
index a905445d0ba91e34fa1f7c7122fce34cd544476f..437379a81070f3e67ff5e84fc436693903e33f56 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
@@ -13,6 +13,8 @@ import 'package:kernel/ast.dart' |
Supertype, |
TypeParameter; |
+import '../fasta_codes.dart' show messageSupertypeIsFunction; |
+ |
import 'kernel_builder.dart' |
show |
FormalParameterBuilder, |
@@ -70,9 +72,8 @@ class KernelFunctionTypeBuilder extends FunctionTypeBuilder |
} |
Supertype buildSupertype(LibraryBuilder library) { |
- library.deprecated_addCompileTimeError( |
- charOffset, "Can't use a function type as supertype.", |
- fileUri: fileUri); |
+ library.addCompileTimeError( |
+ messageSupertypeIsFunction, charOffset, fileUri); |
return null; |
} |
} |