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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/element.dart

Issue 14205011: Issue 9845. Compare runtime types using ==. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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_experimental/lib/src/generated/element.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/element.dart b/pkg/analyzer_experimental/lib/src/generated/element.dart
index 393bbd149a74936fe0db31ea7d40c0ffc9b1c680..c00e40dfb58cae25d3029f8883ba582102b67a7d 100644
--- a/pkg/analyzer_experimental/lib/src/generated/element.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/element.dart
@@ -1700,7 +1700,7 @@ class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
CompilationUnitElementImpl(String name) : super.con2(name, -1) {
}
accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this);
- bool operator ==(Object object) => object != null && identical(runtimeType, object.runtimeType) && _source == ((object as CompilationUnitElementImpl)).source;
+ bool operator ==(Object object) => object != null && runtimeType == object.runtimeType && _source == ((object as CompilationUnitElementImpl)).source;
List<PropertyAccessorElement> get accessors => _accessors;
ElementImpl getChild(String identifier28) {
for (PropertyAccessorElement accessor in _accessors) {
@@ -2039,7 +2039,7 @@ abstract class ElementImpl implements Element {
this._name = StringUtilities.intern(name9);
this._nameOffset = nameOffset2;
}
- bool operator ==(Object object) => object != null && identical(object.runtimeType, runtimeType) && ((object as Element)).location == location;
+ bool operator ==(Object object) => object != null && object.runtimeType == runtimeType && ((object as Element)).location == location;
Element getAncestor(Type elementClass) {
Element ancestor = _enclosingElement;
while (ancestor != null && !isInstanceOf(ancestor, elementClass)) {
@@ -2865,7 +2865,7 @@ class HtmlElementImpl extends ElementImpl implements HtmlElement {
this._context = context;
}
accept(ElementVisitor visitor) => visitor.visitHtmlElement(this);
- bool operator ==(Object object) => identical(runtimeType, object.runtimeType) && _source == ((object as CompilationUnitElementImpl)).source;
+ bool operator ==(Object object) => runtimeType == object.runtimeType && _source == ((object as CompilationUnitElementImpl)).source;
AnalysisContext get context => _context;
ElementKind get kind => ElementKind.HTML;
List<HtmlScriptElement> get scripts => _scripts;
@@ -3093,7 +3093,7 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
this._context = context;
}
accept(ElementVisitor visitor) => visitor.visitLibraryElement(this);
- bool operator ==(Object object) => object != null && identical(runtimeType, object.runtimeType) && _definingCompilationUnit == ((object as LibraryElementImpl)).definingCompilationUnit;
+ bool operator ==(Object object) => object != null && runtimeType == object.runtimeType && _definingCompilationUnit == ((object as LibraryElementImpl)).definingCompilationUnit;
ElementImpl getChild(String identifier31) {
if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier == identifier31) {
return _definingCompilationUnit as CompilationUnitElementImpl;

Powered by Google App Engine
This is Rietveld 408576698