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

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

Issue 2975163002: Remove deprecated API from scope. (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/fasta_codes_generated.dart ('k') | pkg/front_end/lib/src/fasta/scope.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 9c115616c721330db0984c4e68dfc1cd6c139111..f40adce55a3f05da4b22cf869fdb05eb1df5378f 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -17,12 +17,11 @@ import 'package:kernel/transformations/flags.dart' show TransformerFlag;
import '../../scanner/token.dart' show BeginToken, Token;
-import '../deprecated_problems.dart'
- show deprecated_InputError, deprecated_formatUnexpected;
+import '../deprecated_problems.dart' show deprecated_formatUnexpected;
import '../fasta_codes.dart' as fasta;
-import '../fasta_codes.dart' show Message;
+import '../fasta_codes.dart' show LocatedMessage, Message;
import '../messages.dart' as messages show getLocationFromUri;
@@ -326,7 +325,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
"'$name' already declared in this scope.", offset));
return;
}
- deprecated_InputError error = scope.declare(
+ LocatedMessage error = scope.declare(
variable.name,
new KernelVariableBuilder(
variable, member ?? classBuilder ?? library, uri),
@@ -346,9 +345,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
// Reports the error on `print(x)`.
library.addCompileTimeError(
- fasta.templateUnspecified.withArguments(error.error),
- error.charOffset,
- error.uri);
+ error.messageObject, error.charOffset, error.uri);
}
}
@@ -1649,7 +1646,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
if (builder.hasProblem) {
ProblemBuilder problem = builder;
- deprecated_addCompileTimeError(charOffset, problem.deprecated_message);
+ addCompileTimeError(problem.message, charOffset);
} else {
warningNotError(
fasta.templateNotAType.withArguments(builder.fullNameForErrors),
@@ -3236,8 +3233,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
@override
Expression buildProblemExpression(ProblemBuilder builder, int charOffset) {
- return deprecated_buildCompileTimeError(
- builder.deprecated_message, charOffset);
+ return buildCompileTimeError(builder.message, charOffset);
}
@override
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/lib/src/fasta/scope.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698