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

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

Issue 2983443003: Remove deprecated_memberError (Closed)
Patch Set: 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5132abdf007cc3e29e87db03e02002374c1c13b6..9a6e0c95bb7dddedbbbd1e4970797d35a0e075d6 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
@@ -47,6 +47,8 @@ import '../messages.dart'
import '../problems.dart' show internalProblem;
+import '../deprecated_problems.dart' show deprecated_inputError;
+
import '../source/source_library_builder.dart' show SourceLibraryBuilder;
import '../type_inference/type_inference_listener.dart'
@@ -66,8 +68,7 @@ import 'kernel_builder.dart'
MetadataBuilder,
ProcedureBuilder,
TypeVariableBuilder,
- isRedirectingGenerativeConstructorImplementation,
- deprecated_memberError;
+ isRedirectingGenerativeConstructorImplementation;
import 'kernel_shadow_ast.dart' show KernelProcedure;
@@ -357,10 +358,8 @@ class KernelConstructorBuilder extends KernelFunctionBuilder {
void checkSuperOrThisInitializer(Initializer initializer) {
if (superInitializer != null || redirectingInitializer != null) {
- deprecated_memberError(
- target,
- "Can't have more than one 'super' or 'this' initializer.",
- initializer.fileOffset);
+ return deprecated_inputError(fileUri, initializer.fileOffset,
+ "Can't have more than one 'super' or 'this' initializer.");
}
}
@@ -373,16 +372,12 @@ class KernelConstructorBuilder extends KernelFunctionBuilder {
checkSuperOrThisInitializer(initializer);
redirectingInitializer = initializer;
if (constructor.initializers.isNotEmpty) {
- deprecated_memberError(
- target,
- "'this' initializer must be the only initializer.",
- initializer.fileOffset);
+ deprecated_inputError(fileUri, initializer.fileOffset,
+ "'this' initializer must be the only initializer.");
}
} else if (redirectingInitializer != null) {
- deprecated_memberError(
- target,
- "'this' initializer must be the only initializer.",
- initializer.fileOffset);
+ deprecated_inputError(fileUri, initializer.fileOffset,
+ "'this' initializer must be the only initializer.");
} else if (superInitializer != null) {
// If there is a super initializer ([initializer] isn't it), we need to
// insert [initializer] before the super initializer (thus ensuring that
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698