Skip to content

Commit 722f7fa

Browse files
stereotype441Commit Queue
authored andcommitted
[analyzer] Remove ErrorClassInfo.superclass.
This field's default value, `DiagnosticCode`, was never overridden. It's cleaner to just inline that value in the one place it was used. Change-Id: I6a6a6964b16f72486ad21c3f343ce91504c44be6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445524 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Auto-Submit: Paul Berry <paulberry@google.com>
1 parent 2245a9d commit 722f7fa

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

pkg/analyzer/tool/messages/error_code_info.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,6 @@ class ErrorClassInfo {
532532
/// based on the [type] of the error.
533533
final String? severity;
534534

535-
/// The superclass of this class.
536-
final String superclass;
537-
538535
/// The type of errors in this class.
539536
final String type;
540537

@@ -558,7 +555,6 @@ class ErrorClassInfo {
558555
this.includeCfeMessages = false,
559556
required this.name,
560557
this.severity,
561-
this.superclass = 'DiagnosticCode',
562558
required this.type,
563559
this.deprecatedSnakeCaseNames = const {},
564560
this.includeInDiagnosticCodeValues = true,

pkg/analyzer/tool/messages/generate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ library;
142142
out.writeln('/// $line');
143143
});
144144
}
145-
out.write('class ${errorClass.name} extends ${errorClass.superclass} {');
145+
out.write('class ${errorClass.name} extends DiagnosticCode {');
146146
var entries = [
147147
...analyzerMessages[errorClass.name]!.entries,
148148
if (errorClass.includeCfeMessages)

0 commit comments

Comments
 (0)