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

Unified Diff: runtime/lib/growable_array.dart

Issue 12391046: Add List.asMap(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index e1a858364b035e1c726ecd26c9da234cfeb3f1be..131e31751cd41a8ce8868a2329f33d609c028658 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -327,4 +327,8 @@ class _GrowableObjectArray<T> implements List<T> {
Set<T> toSet() {
return new Set<T>.from(this);
}
+
+ Map<int, T> asMap() {
+ return IterableMixinWorkaround.asMapList(this);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698