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

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

Issue 2767653002: Implement fullNameForErrors on all Builders. (Closed)
Patch Set: Used <unnamed> instead of empty string. Created 3 years, 9 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/builder_accessors.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart b/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart
index 50658378e4e55d873045e76eb43bf29f18fa089a..cc0b9364fddddffb42ed67c26753f7965337d8ca 100644
--- a/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart
@@ -12,6 +12,8 @@ import 'package:kernel/ast.dart';
import 'package:kernel/core_types.dart' show CoreTypes;
+import '../builder/scope.dart' show ProblemBuilder;
+
import '../errors.dart' show internalError, printUnexpected;
import 'frontend_accessors.dart' as kernel
@@ -54,7 +56,7 @@ abstract class BuilderHelper {
Expression buildStaticInvocation(Procedure target, Arguments arguments);
- Expression buildProblemExpression(Builder builder, String name);
+ Expression buildProblemExpression(ProblemBuilder builder, int charOffset);
}
abstract class BuilderAccessor implements Accessor {
@@ -347,7 +349,7 @@ class SendAccessor extends IncompleteSend {
return buildThrowNoSuchMethodError(arguments);
}
if (builder.hasProblem) {
- result = helper.buildProblemExpression(builder, name.name);
+ result = helper.buildProblemExpression(builder, charOffset);
} else {
Member target = builder.target;
if (target != null) {
@@ -438,8 +440,7 @@ class IncompletePropertyAccessor extends IncompleteSend {
setter = builder.target;
}
if (builder.hasProblem) {
- return helper.buildProblemExpression(builder, name.name)
- ..fileOffset = charOffset;
+ return helper.buildProblemExpression(builder, charOffset);
}
if (getter is Field) {
if (!getter.isFinal && !getter.isConst) {
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_variable_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698