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

Unified Diff: pkg/source_span/lib/src/span_mixin.dart

Issue 754463002: Avoid instantiating FileLocations where possible in source_span. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/source_span/lib/src/span_mixin.dart
diff --git a/pkg/source_span/lib/src/span_mixin.dart b/pkg/source_span/lib/src/span_mixin.dart
index 95a720aaef3a565ddaa22b31e463f87bdcaca2a4..dbfbcadd4dc9dd1644dc337614b591afd29732ac 100644
--- a/pkg/source_span/lib/src/span_mixin.dart
+++ b/pkg/source_span/lib/src/span_mixin.dart
@@ -65,7 +65,7 @@ abstract class SourceSpanMixin implements SourceSpan {
return buffer.toString();
}
- bool operator ==(SourceSpan other) =>
+ bool operator ==(other) => other is SourceSpan &&
start == other.start && end == other.end;
int get hashCode => start.hashCode + (31 * end.hashCode);

Powered by Google App Engine
This is Rietveld 408576698