Add explicit type to generated LSP classes == operators
Change-Id: I42f76c8d48329fed93821a17da71963eaa813d4f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128161 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Danny Tuppeny <dantup@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
3739b80534
commit
7c5d83d170
@@ -74,7 +74,7 @@ class AnalyzerStatusParams implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is AnalyzerStatusParams) {
|
||||
return isAnalyzing == other.isAnalyzing && true;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ class ClosingLabel implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is ClosingLabel) {
|
||||
return range == other.range && label == other.label && true;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ class CompletionItemResolutionInfo implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is CompletionItemResolutionInfo) {
|
||||
return file == other.file &&
|
||||
offset == other.offset &&
|
||||
@@ -431,7 +431,7 @@ class DartDiagnosticServer implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is DartDiagnosticServer) {
|
||||
return port == other.port && true;
|
||||
}
|
||||
@@ -544,7 +544,7 @@ class Element implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is Element) {
|
||||
return range == other.range &&
|
||||
name == other.name &&
|
||||
@@ -686,7 +686,7 @@ class Outline implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is Outline) {
|
||||
return element == other.element &&
|
||||
range == other.range &&
|
||||
@@ -789,7 +789,7 @@ class PublishClosingLabelsParams implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is PublishClosingLabelsParams) {
|
||||
return uri == other.uri &&
|
||||
listEqual(labels, other.labels,
|
||||
@@ -885,7 +885,7 @@ class PublishOutlineParams implements ToJsonable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is PublishOutlineParams) {
|
||||
return uri == other.uri && outline == other.outline && true;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -346,7 +346,7 @@ void _writeEnumClass(IndentableStringBuffer buffer, Namespace namespace) {
|
||||
..writeIndentedln('@override get hashCode => _value.hashCode;')
|
||||
..writeln()
|
||||
..writeIndentedln(
|
||||
'bool operator ==(o) => o is ${namespace.name} && o._value == _value;')
|
||||
'bool operator ==(Object o) => o is ${namespace.name} && o._value == _value;')
|
||||
..outdent()
|
||||
..writeln('}')
|
||||
..writeln();
|
||||
@@ -355,7 +355,7 @@ void _writeEnumClass(IndentableStringBuffer buffer, Namespace namespace) {
|
||||
void _writeEquals(IndentableStringBuffer buffer, Interface interface) {
|
||||
buffer
|
||||
..writeIndentedln('@override')
|
||||
..writeIndentedln('bool operator ==(other) {')
|
||||
..writeIndentedln('bool operator ==(Object other) {')
|
||||
..indent()
|
||||
..writeIndentedln('if (other is ${interface.name}) {')
|
||||
..indent()
|
||||
|
||||
Reference in New Issue
Block a user