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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/constants.dart

Issue 17569004: Implement hashCode on objects stored in a set or used as map keys. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on CL 17588005. Created 7 years, 6 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: dart/sdk/lib/_internal/compiler/implementation/constants.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/constants.dart b/dart/sdk/lib/_internal/compiler/implementation/constants.dart
index 06e04fc9325137cfe2fa58adf64ffd0b577f7cac..5a78207c50da3d553dbffe889b8b51afdca05950 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/constants.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/constants.dart
@@ -108,6 +108,8 @@ abstract class PrimitiveConstant extends Constant {
return value == otherPrimitive.value;
}
+ int get hashCode => throw new UnsupportedError('PrimitiveConstant.hashCode');
+
String toString() => value.toString();
// Primitive constants don't have dependencies.
List<Constant> getDependencies() => const <Constant>[];

Powered by Google App Engine
This is Rietveld 408576698