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

Unified Diff: pkg/front_end/lib/src/fasta/builder/class_builder.dart

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec 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/builder/class_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
index 9f462c8a32138a67a45472f03741185914d31ab2..07a9b2e47736254a099e0cd3dffcbeaab8e16c21 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -4,7 +4,7 @@
library fasta.class_builder;
-import '../errors.dart' show internalError;
+import '../deprecated_problems.dart' show deprecated_internalProblem;
import 'builder.dart'
show
@@ -164,8 +164,10 @@ abstract class ClassBuilder<T extends TypeBuilder, R>
}
supertype = t.supertype;
} else {
- internalError("Superclass not found '${superclass.fullNameForErrors}'.",
- fileUri, charOffset);
+ deprecated_internalProblem(
+ "Superclass not found '${superclass.fullNameForErrors}'.",
+ fileUri,
+ charOffset);
}
if (variables != null) {
Map<TypeVariableBuilder, TypeBuilder> directSubstitutionMap =
@@ -192,18 +194,20 @@ abstract class ClassBuilder<T extends TypeBuilder, R>
/// (and isn't a setter).
MemberBuilder operator [](String name) {
// TODO(ahe): Rename this to getLocalMember.
- return scope.local[name] ?? internalError("Not found: '$name'.");
+ return scope.local[name] ??
+ deprecated_internalProblem("Not found: '$name'.");
}
- void addCompileTimeError(int charOffset, String message) {
- library.addCompileTimeError(charOffset, message, fileUri: fileUri);
+ void deprecated_addCompileTimeError(int charOffset, String message) {
+ library.deprecated_addCompileTimeError(charOffset, message,
+ fileUri: fileUri);
}
- void addWarning(int charOffset, String message) {
- library.addWarning(charOffset, message, fileUri: fileUri);
+ void deprecated_addWarning(int charOffset, String message) {
+ library.deprecated_addWarning(charOffset, message, fileUri: fileUri);
}
- void addNit(int charOffset, String message) {
- library.addNit(charOffset, message, fileUri: fileUri);
+ void deprecated_addNit(int charOffset, String message) {
+ library.deprecated_addNit(charOffset, message, fileUri: fileUri);
}
}

Powered by Google App Engine
This is Rietveld 408576698