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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2473233004: Implement FileState.hashCode/==. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 5d11c9f6215d40a693de381ffd63125283b0dc54..3df2b1ad8c9ac4b65bf94a9f26da7fbfc20bd1b3 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -119,6 +119,9 @@ class FileState {
*/
List<FileState> get exportedFiles => _exportedFiles;
+ @override
+ int get hashCode => uri.hashCode;
+
/**
* The list of files this file imports.
*/
@@ -139,6 +142,11 @@ class FileState {
*/
UnlinkedUnit get unlinked => _unlinked;
+ @override
+ bool operator ==(Object other) {
+ return other is FileState && other.uri == uri;
+ }
+
/**
* Return a new parsed unresolved [CompilationUnit].
*/
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698