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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_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/source/source_class_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index fcebef7cdf3b12503de2bbe1087c12d05530b07c..9d9c755da3139a4114ee2c97ddc2a9354197aa34 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -13,7 +13,7 @@ import 'package:front_end/src/fasta/source/source_library_builder.dart'
import 'package:kernel/ast.dart'
show Class, Constructor, Supertype, TreeNode, setParents;
-import '../errors.dart' show internalError;
+import '../deprecated_problems.dart' show deprecated_internalProblem;
import '../kernel/kernel_builder.dart'
show
@@ -91,7 +91,8 @@ class SourceClassBuilder extends KernelClassBuilder {
} else if (builder is KernelFunctionBuilder) {
cls.addMember(builder.build(library));
} else {
- internalError("Unhandled builder: ${builder.runtimeType}");
+ deprecated_internalProblem(
+ "Unhandled builder: ${builder.runtimeType}");
}
builder = builder.next;
} while (builder != null);
@@ -118,13 +119,13 @@ class SourceClassBuilder extends KernelClassBuilder {
Builder member = scopeBuilder[name];
if (member == null) return;
// TODO(ahe): charOffset is missing.
- addCompileTimeError(
+ deprecated_addCompileTimeError(
constructor.charOffset, "Conflicts with member '${name}'.");
if (constructor.isFactory) {
- addCompileTimeError(member.charOffset,
+ deprecated_addCompileTimeError(member.charOffset,
"Conflicts with factory '${this.name}.${name}'.");
} else {
- addCompileTimeError(member.charOffset,
+ deprecated_addCompileTimeError(member.charOffset,
"Conflicts with constructor '${this.name}.${name}'.");
}
});
@@ -134,8 +135,8 @@ class SourceClassBuilder extends KernelClassBuilder {
if (member == null || !member.isField || member.isFinal) return;
// TODO(ahe): charOffset is missing.
var report = member.isInstanceMember != setter.isInstanceMember
- ? addWarning
- : addCompileTimeError;
+ ? deprecated_addWarning
+ : deprecated_addCompileTimeError;
report(setter.charOffset, "Conflicts with member '${name}'.");
report(member.charOffset, "Conflicts with setter '${name}'.");
});

Powered by Google App Engine
This is Rietveld 408576698