Index: pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart |
index cbc3d5493e744b9e08251b7015abbc7e689bce03..5132abdf007cc3e29e87db03e02002374c1c13b6 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart |
@@ -39,6 +39,8 @@ import '../loader.dart' show Loader; |
import '../messages.dart' |
show |
+ messageConstConstructorWithBody, |
+ messageExternalMethodWithBody, |
messageInternalProblemBodyOnAbstractMethod, |
messageNonInstanceTypeVariableUse, |
warning; |
@@ -97,12 +99,12 @@ abstract class KernelFunctionBuilder |
newBody.fileOffset, fileUri); |
} |
if (isExternal) { |
- return library.deprecated_addCompileTimeError( |
- newBody.fileOffset, "An external method can't have a body."); |
+ return library.addCompileTimeError( |
+ messageExternalMethodWithBody, newBody.fileOffset, fileUri); |
} |
if (isConstructor && isConst) { |
- return library.deprecated_addCompileTimeError( |
- newBody.fileOffset, "A const constructor can't have a body."); |
+ return library.addCompileTimeError( |
+ messageConstConstructorWithBody, newBody.fileOffset, fileUri); |
} |
} |
actualBody = newBody; |