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

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

Issue 10837025: Properly emit variable declarations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 7aeca1f4c8b1681b4048be48920fecbddf496d41..1d951796313ebf2a8e5288d1ba8c9784d315d79c 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -173,7 +173,7 @@ class Element implements Hashable {
// 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.hashCode();
+ int hashCode() => name === null ? 0 : name.hashCode();
CompilationUnitElement getCompilationUnit() {
Element element = this;

Powered by Google App Engine
This is Rietveld 408576698