From 5797adfb66c60723b54271f573d331ad25605ce0 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 21 Dec 2023 17:09:35 -0800 Subject: [PATCH] Fix Object? in == operator --- dwds/lib/src/debugging/location.dart | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dwds/lib/src/debugging/location.dart b/dwds/lib/src/debugging/location.dart index 26c954ed2..273e0e018 100644 --- a/dwds/lib/src/debugging/location.dart +++ b/dwds/lib/src/debugging/location.dart @@ -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]';