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

Unified Diff: sdk/lib/collection/splay_tree.dart

Issue 1127043002: Fix SplayTreeMap.from ignoring the compare and isValidKey arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | tests/corelib/splay_tree_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/splay_tree.dart
diff --git a/sdk/lib/collection/splay_tree.dart b/sdk/lib/collection/splay_tree.dart
index b5fcb93876f21b435abc91fb176380628a3b9863..fea7d348b61659b4da3016089d0da737982c0bc7 100644
--- a/sdk/lib/collection/splay_tree.dart
+++ b/sdk/lib/collection/splay_tree.dart
@@ -274,7 +274,7 @@ class SplayTreeMap<K, V> extends _SplayTree<K> implements Map<K, V> {
factory SplayTreeMap.from(Map other,
[int compare(K key1, K key2),
bool isValidKey(potentialKey)]) {
- SplayTreeMap<K, V> result = new SplayTreeMap<K, V>();
+ SplayTreeMap<K, V> result = new SplayTreeMap<K, V>(compare, isValidKey);
other.forEach((k, v) { result[k] = v; });
return result;
}
« no previous file with comments | « no previous file | tests/corelib/splay_tree_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698