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

Unified Diff: pkg/front_end/lib/src/fasta/scope.dart

Issue 2974933002: Remove deprecated_internalProblem. (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
Index: pkg/front_end/lib/src/fasta/scope.dart
diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart
index 2dad38fe380f1403cd5d3172bc42e1204f31d6c1..178953241737779331dd6ba689f29460dd812fe7 100644
--- a/pkg/front_end/lib/src/fasta/scope.dart
+++ b/pkg/front_end/lib/src/fasta/scope.dart
@@ -6,8 +6,11 @@ library fasta.scope;
import 'builder/builder.dart' show Builder, TypeVariableBuilder;
-import 'deprecated_problems.dart'
- show deprecated_InputError, deprecated_internalProblem;
+import 'deprecated_problems.dart' show deprecated_InputError;
+
+import 'problems.dart' show internalProblem, unsupported;
+
+import 'fasta_codes.dart' show messageInternalProblemExtendingUnmodifiableScope;
class MutableScope {
/// Names declared in this scope.
@@ -50,13 +53,13 @@ class Scope extends MutableScope {
: this(<String, Builder>{}, null, parent, isModifiable: isModifiable);
/// Don't use this. Use [becomePartOf] instead.
- void set local(_) => deprecated_internalProblem("Unsupported operation.");
+ void set local(_) => unsupported("local=", -1, null);
/// Don't use this. Use [becomePartOf] instead.
- void set setters(_) => deprecated_internalProblem("Unsupported operation.");
+ void set setters(_) => unsupported("setters=", -1, null);
/// Don't use this. Use [becomePartOf] instead.
- void set parent(_) => deprecated_internalProblem("Unsupported operation.");
+ void set parent(_) => unsupported("parent=", -1, null);
/// This scope becomes equivalent to [scope]. This is used for parts to
/// become part of their library's scope.
@@ -120,8 +123,7 @@ class Scope extends MutableScope {
if (builder != null) return builder;
builder = lookupIn(name, charOffset, fileUri, setters, isInstanceScope);
if (builder != null && !builder.hasProblem) {
- return new deprecated_AccessErrorBuilder(
- name, builder, charOffset, fileUri);
+ return new AccessErrorBuilder(name, builder, charOffset, fileUri);
}
if (!isInstanceScope) {
// For static lookup, do not seach the parent scope.
@@ -138,8 +140,7 @@ class Scope extends MutableScope {
if (builder != null) return builder;
builder = lookupIn(name, charOffset, fileUri, local, isInstanceScope);
if (builder != null && !builder.hasProblem) {
- return new deprecated_AccessErrorBuilder(
- name, builder, charOffset, fileUri);
+ return new AccessErrorBuilder(name, builder, charOffset, fileUri);
}
if (!isInstanceScope) {
// For static lookup, do not seach the parent scope.
@@ -155,7 +156,8 @@ class Scope extends MutableScope {
labels ??= <String, Builder>{};
labels[name] = target;
} else {
- deprecated_internalProblem("Can't extend an unmodifiable scope.");
+ internalProblem(
+ messageInternalProblemExtendingUnmodifiableScope, -1, null);
}
}
@@ -196,7 +198,8 @@ class Scope extends MutableScope {
recordUse(name, charOffset, fileUri);
local[name] = builder;
} else {
- deprecated_internalProblem("Can't extend an unmodifiable scope.");
+ internalProblem(
+ messageInternalProblemExtendingUnmodifiableScope, -1, null);
}
return null;
}
@@ -284,9 +287,8 @@ abstract class ProblemBuilder extends Builder {
/// Represents a [builder] that's being accessed incorrectly. For example, an
/// attempt to write to a final field, or to read from a setter.
-class deprecated_AccessErrorBuilder extends ProblemBuilder {
- deprecated_AccessErrorBuilder(
- String name, Builder builder, int charOffset, Uri fileUri)
+class AccessErrorBuilder extends ProblemBuilder {
+ AccessErrorBuilder(String name, Builder builder, int charOffset, Uri fileUri)
: super(name, builder, charOffset, fileUri);
Builder get parent => builder;

Powered by Google App Engine
This is Rietveld 408576698