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 8c092c031c11ea22f52c535a8b4d9defd41dc394..5ae57e92e7f4a32d4ef299e995331f06e3bec24d 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 |
@@ -44,9 +44,9 @@ import 'package:kernel/ast.dart' |
import 'package:kernel/type_algebra.dart' show containsTypeVariable, substitute; |
-import '../errors.dart' show internalError; |
+import '../deprecated_problems.dart' show deprecated_internalProblem; |
-import '../messages.dart' show warning; |
+import '../messages.dart' show deprecated_warning; |
import '../loader.dart' show Loader; |
@@ -65,7 +65,7 @@ import 'kernel_builder.dart' |
ProcedureBuilder, |
TypeVariableBuilder, |
isRedirectingGenerativeConstructorImplementation, |
- memberError; |
+ deprecated_memberError; |
abstract class KernelFunctionBuilder |
extends ProcedureBuilder<KernelTypeBuilder> { |
@@ -91,14 +91,15 @@ abstract class KernelFunctionBuilder |
void set body(Statement newBody) { |
if (newBody != null) { |
if (isAbstract) { |
- return internalError("Attempting to set body on abstract method."); |
+ return deprecated_internalProblem( |
+ "Attempting to set body on abstract method."); |
} |
if (isExternal) { |
- return library.addCompileTimeError( |
+ return library.deprecated_addCompileTimeError( |
newBody.fileOffset, "An external method can't have a body."); |
} |
if (isConstructor && isConst) { |
- return library.addCompileTimeError( |
+ return library.deprecated_addCompileTimeError( |
newBody.fileOffset, "A const constructor can't have a body."); |
} |
} |
@@ -150,7 +151,7 @@ abstract class KernelFunctionBuilder |
substitution[parameter] = const DynamicType(); |
} |
} |
- warning(fileUri, charOffset, |
+ deprecated_warning(fileUri, charOffset, |
"Can only use type variables in instance methods."); |
return substitute(type, substitution); |
} |
@@ -353,7 +354,7 @@ class KernelConstructorBuilder extends KernelFunctionBuilder { |
void checkSuperOrThisInitializer(Initializer initializer) { |
if (superInitializer != null || redirectingInitializer != null) { |
- memberError( |
+ deprecated_memberError( |
target, |
"Can't have more than one 'super' or 'this' initializer.", |
initializer.fileOffset); |
@@ -369,11 +370,15 @@ class KernelConstructorBuilder extends KernelFunctionBuilder { |
checkSuperOrThisInitializer(initializer); |
redirectingInitializer = initializer; |
if (constructor.initializers.isNotEmpty) { |
- memberError(target, "'this' initializer must be the only initializer.", |
+ deprecated_memberError( |
+ target, |
+ "'this' initializer must be the only initializer.", |
initializer.fileOffset); |
} |
} else if (redirectingInitializer != null) { |
- memberError(target, "'this' initializer must be the only initializer.", |
+ deprecated_memberError( |
+ target, |
+ "'this' initializer must be the only initializer.", |
initializer.fileOffset); |
} else if (superInitializer != null) { |
// If there is a super initializer ([initializer] isn't it), we need to |