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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_class_builder.dart

Issue 2977693002: Remove deprecated methods from ClassBuilder. (Closed)
Patch Set: Spelling of unnamed. 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 87bfcbd65a0db0af9c95ab11eda057cdd8950f52..62ebbbd1ade789f5dd4081c81a73dc34a821a7d8 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
@@ -9,6 +9,13 @@ import 'package:kernel/ast.dart'
import '../dill/dill_member_builder.dart' show DillMemberBuilder;
+import '../fasta_codes.dart'
+ show
+ templateConflictsWithConstructor,
+ templateConflictsWithFactory,
+ templateConflictsWithMember,
+ templateConflictsWithSetter;
+
import '../kernel/kernel_builder.dart'
show
Builder,
@@ -116,14 +123,17 @@ class SourceClassBuilder extends KernelClassBuilder {
Builder member = scopeBuilder[name];
if (member == null) return;
// TODO(ahe): charOffset is missing.
- deprecated_addCompileTimeError(
- constructor.charOffset, "Conflicts with member '${name}'.");
+ addCompileTimeError(templateConflictsWithMember.withArguments(name),
+ constructor.charOffset);
if (constructor.isFactory) {
- deprecated_addCompileTimeError(member.charOffset,
- "Conflicts with factory '${this.name}.${name}'.");
+ addCompileTimeError(
+ templateConflictsWithFactory.withArguments("${this.name}.${name}"),
+ member.charOffset);
} else {
- deprecated_addCompileTimeError(member.charOffset,
- "Conflicts with constructor '${this.name}.${name}'.");
+ addCompileTimeError(
+ templateConflictsWithConstructor
+ .withArguments("${this.name}.${name}"),
+ member.charOffset);
}
});
@@ -132,10 +142,12 @@ class SourceClassBuilder extends KernelClassBuilder {
if (member == null || !member.isField || member.isFinal) return;
// TODO(ahe): charOffset is missing.
var report = member.isInstanceMember != setter.isInstanceMember
- ? deprecated_addWarning
- : deprecated_addCompileTimeError;
- report(setter.charOffset, "Conflicts with member '${name}'.");
- report(member.charOffset, "Conflicts with setter '${name}'.");
+ ? addWarning
+ : addCompileTimeError;
+ report(
+ templateConflictsWithMember.withArguments(name), setter.charOffset);
+ report(
+ templateConflictsWithSetter.withArguments(name), member.charOffset);
});
cls.procedures.sort(compareProcedures);
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart ('k') | pkg/front_end/lib/src/fasta/source/source_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698