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

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

Issue 18721005: Add order to DartType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased + updated cf. comments. Created 7 years, 3 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: sdk/lib/_internal/compiler/implementation/elements/elements.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 65a4c568b6655db779ddb7363d558d72e76aed90..cf456b64cb323c3f8ff88cab38319ab344f84c1f 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -495,6 +495,7 @@ class Elements {
/// A `compareTo` function that places [Element]s in a consistent order based
/// on the source code order.
static int compareByPosition(Element a, Element b) {
+ if (identical(a, b)) return 0;
int r = a.getLibrary().compareTo(b.getLibrary());
if (r != 0) return r;
r = a.getCompilationUnit().compareTo(b.getCompilationUnit());
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart_types.dart ('k') | tests/compiler/dart2js/type_order_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698