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

Unified Diff: sdk/lib/collection/arrays.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
Index: sdk/lib/collection/arrays.dart
diff --git a/sdk/lib/collection/arrays.dart b/sdk/lib/collection/arrays.dart
index 783518257326d3d8c66ecd76cbb67af2e84cfdcf..ce8f8b48c2937eacbfdb42e341cde5e608a5a855 100644
--- a/sdk/lib/collection/arrays.dart
+++ b/sdk/lib/collection/arrays.dart
@@ -6,8 +6,8 @@
class Arrays {
static void copy(List src, int srcStart,
List dst, int dstStart, int count) {
- if (srcStart === null) srcStart = 0;
- if (dstStart === null) dstStart = 0;
+ if (srcStart == null) srcStart = 0;
+ if (dstStart == null) dstStart = 0;
if (srcStart < dstStart) {
for (int i = srcStart + count - 1, j = dstStart + count - 1;
@@ -22,13 +22,13 @@ class Arrays {
}
static bool areEqual(List a, Object b) {
- if (a === b) return true;
+ if (identical(a, b)) return true;
if (!(b is List)) return false;
int length = a.length;
if (length != b.length) return false;
for (int i = 0; i < length; i++) {
- if (a[i] !== b[i]) return false;
+ if (!identical(a[i], b[i])) return false;
}
return true;
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart ('k') | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698