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

Unified Diff: utils/pub/yaml/deep_equals.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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
« no previous file with comments | « utils/peg/pegparser.dart ('k') | utils/pub/yaml/yaml_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/yaml/deep_equals.dart
diff --git a/utils/pub/yaml/deep_equals.dart b/utils/pub/yaml/deep_equals.dart
index d71f4d6e4cee1c8c7cf9408257b91473ebf2b6b0..95c69c77a52a17bc0f0749f75c570be09f0e246b 100644
--- a/utils/pub/yaml/deep_equals.dart
+++ b/utils/pub/yaml/deep_equals.dart
@@ -9,7 +9,7 @@ library deep_equals;
* values to be equivalent. It also handles self-referential structures.
*/
bool deepEquals(obj1, obj2, [List parents1, List parents2]) {
- if (obj1 === obj2) return true;
+ if (identical(obj1, obj2)) return true;
if (parents1 == null) {
parents1 = [];
parents2 = [];
@@ -17,8 +17,8 @@ bool deepEquals(obj1, obj2, [List parents1, List parents2]) {
// parents1 and parents2 are guaranteed to be the same size.
for (var i = 0; i < parents1.length; i++) {
- var loop1 = obj1 === parents1[i];
- var loop2 = obj2 === parents2[i];
+ var loop1 = identical(obj1, parents1[i]);
+ var loop2 = identical(obj2, parents2[i]);
// If both structures loop in the same place, they're equal at that point in
// the structure. If one loops and the other doesn't, they're not equal.
if (loop1 && loop2) return true;
« no previous file with comments | « utils/peg/pegparser.dart ('k') | utils/pub/yaml/yaml_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698