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

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

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec 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
Index: pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
index 7a52861b203c9c7790d03b8b286ef9cc3b74cf6d..63016ad9e54ca989b5e72aa6cb56cbcab26aa985 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
@@ -25,7 +25,7 @@ import 'package:front_end/src/fasta/type_inference/type_inference_listener.dart'
import 'package:kernel/ast.dart'
show DartType, Expression, Field, Name, NullLiteral;
-import '../errors.dart' show internalError;
+import '../deprecated_problems.dart' show deprecated_internalProblem;
import 'kernel_builder.dart'
show Builder, FieldBuilder, KernelTypeBuilder, MetadataBuilder;
@@ -52,7 +52,8 @@ class KernelFieldBuilder extends FieldBuilder<Expression> {
void set initializer(Expression value) {
if (!hasInitializer && value is! NullLiteral && !isConst && !isFinal) {
- internalError("Attempt to set initializer on field without initializer.");
+ deprecated_internalProblem(
+ "Attempt to set initializer on field without initializer.");
}
field.initializer = value..parent = field;
}

Powered by Google App Engine
This is Rietveld 408576698