Skip to content

Commit

Permalink
Fix Object? in == operator
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Dec 22, 2023
1 parent 7543345 commit 5797adf
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions dwds/lib/src/debugging/location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,11 @@ class DartLocation {
int get hashCode => Object.hashAll([uri, line, column]);

@override
bool operator ==(Object? other) {
if (other is! DartLocation) {
return false;
}
return uri.serverPath == other.uri.serverPath &&
line == other.line &&
column == other.column;
}
bool operator ==(Object other) =>
other is DartLocation &&
uri.serverPath == other.uri.serverPath &&
line == other.line &&
column == other.column;

@override
String toString() => '[${uri.serverPath}:$line:$column]';
Expand Down

0 comments on commit 5797adf

Please sign in to comment.