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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1553253002: Tweaks for compatibilities with summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index ff3986823980880bd0ee10c2e968a1c042c1a6b6..00e4fe29416979e76a28113796c9584d70cbda65 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1807,6 +1807,9 @@ abstract class ElementImpl implements Element {
@override
ElementLocation get location {
if (_cachedLocation == null) {
+ if (library == null) {
+ return new ElementLocationImpl.con1(this);
+ }
_cachedLocation = new ElementLocationImpl.con1(this);
}
return _cachedLocation;
@@ -1860,11 +1863,9 @@ abstract class ElementImpl implements Element {
if (identical(this, object)) {
return true;
}
- if (object == null || hashCode != object.hashCode) {
- return false;
- }
- return object.runtimeType == runtimeType &&
- (object as Element).location == location;
+ return object is Element &&
+ object.kind == kind &&
+ object.location == location;
}
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698