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

Unified Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 1917203002: Remove more type casts (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months 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/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index f94374d8f084842e08e4ee04de98f541347179b4..65e8f953af24d826d5aa0e57d648f2480745a3b1 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -268,7 +268,6 @@ class LineInfo {
}
return _lineStarts[lineNumber];
}
-
}
/**
@@ -756,12 +755,10 @@ class SourceRange {
int get hashCode => 31 * offset + length;
@override
- bool operator ==(Object obj) {
- if (obj is! SourceRange) {
- return false;
- }
- SourceRange sourceRange = obj as SourceRange;
- return sourceRange.offset == offset && sourceRange.length == length;
+ bool operator ==(Object other) {
+ return other is SourceRange &&
+ other.offset == offset &&
+ other.length == length;
}
/**

Powered by Google App Engine
This is Rietveld 408576698