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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index faa0f1c584304e388190b717ba43943c42345285..c40e6852ca7914e097919b4b542cb74473494f72 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -264,7 +264,7 @@ class Element implements Spannable {
// TODO(kasperl): This is a very bad hash code for the element and
// there's no reason why two elements with the same name should have
// the same hash code. Replace this with a simple id in the element?
- int hashCode() => name == null ? 0 : name.hashCode();
+ int get hashCode => name == null ? 0 : name.hashCode;
CompilationUnitElement getCompilationUnit() {
Element element = this;
@@ -1644,7 +1644,7 @@ abstract class ClassElement extends ScopeContainerElement
bool isInterface() => false;
bool isNative() => nativeName != null;
- int hashCode() => id;
+ int get hashCode => id;
// TODO(johnniwinther): Rewrite to avoid the optional argument.
Scope buildScope({bool patchScope: false}) {

Powered by Google App Engine
This is Rietveld 408576698