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

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

Issue 2965393002: Use FastaMessage instead of String. Part 1. (Closed)
Patch Set: Add type variable to Code. 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_class_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
index 8882a962112c8edeb96ebbf70e2e27b89c1d64ee..5fa005af74f1d41168dbaf943de40c529664105c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
@@ -29,6 +29,8 @@ import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
import '../deprecated_problems.dart' show deprecated_internalProblem;
+import '../fasta_codes.dart' show templateRedirectionTargetNotFound;
+
import '../dill/dill_member_builder.dart' show DillMemberBuilder;
import 'kernel_builder.dart'
@@ -131,12 +133,12 @@ abstract class KernelClassBuilder
} else if (targetBuilder is DillMemberBuilder) {
builder.body = new RedirectingFactoryBody(targetBuilder.member);
} else {
- String message = "Redirection constructor target not found: "
- "${redirectionTarget.fullNameForErrors}";
+ var message = templateRedirectionTargetNotFound
+ .withArguments(redirectionTarget.fullNameForErrors);
if (builder.isConst) {
- deprecated_addCompileTimeError(builder.charOffset, message);
+ addCompileTimeError(message, builder.charOffset);
} else {
- deprecated_addWarning(builder.charOffset, message);
+ addWarning(message, builder.charOffset);
}
// CoreTypes aren't computed yet, and this is the outline
// phase. So we can't and shouldn't create a method body.

Powered by Google App Engine
This is Rietveld 408576698