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 ef270ba87bc2ad0b7f0794ef46ed6cb8ebc97ef0..92671c060799d1a04b6ede8b2e56d2d9f615e710 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
@@ -30,7 +30,7 @@ import '../errors.dart' show formatUnexpected, internalError; |
import '../source/scope_listener.dart' |
show JumpTargetKind, NullValue, ScopeListener; |
-import '../builder/scope.dart' show AccessErrorBuilder, AmbiguousBuilder, Scope; |
+import '../builder/scope.dart' show ProblemBuilder, Scope; |
import '../source/outline_builder.dart' show asyncMarkerFromTokens; |
@@ -2267,14 +2267,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
} |
@override |
- Expression buildProblemExpression(Builder builder, String name) { |
- if (builder is AmbiguousBuilder) { |
- return buildCompileTimeError("Duplicated named: '$name'."); |
- } else if (builder is AccessErrorBuilder) { |
- return buildCompileTimeError("Access error: '$name'."); |
- } else { |
- return internalError("Unhandled: ${builder.runtimeType}"); |
- } |
+ Expression buildProblemExpression(ProblemBuilder builder, int charOffset) { |
+ return buildCompileTimeError(builder.message, charOffset); |
} |
@override |
@@ -2589,6 +2583,9 @@ class JumpTarget extends Builder { |
} |
users.clear(); |
} |
+ |
+ @override |
+ String get fullNameForErrors => "<jump-target>"; |
} |
class LabelTarget extends Builder implements JumpTarget { |
@@ -2640,6 +2637,9 @@ class LabelTarget extends Builder implements JumpTarget { |
void resolveGotos(SwitchCase target) { |
internalError("Unsupported operation."); |
} |
+ |
+ @override |
+ String get fullNameForErrors => "<label-target>"; |
} |
class OptionalFormals { |