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

Unified Diff: tools/dom/templates/immutable_list_mixin.darttemplate

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: tools/dom/templates/immutable_list_mixin.darttemplate
diff --git a/tools/dom/templates/immutable_list_mixin.darttemplate b/tools/dom/templates/immutable_list_mixin.darttemplate
index 0c0658b7ed6e58b32d31a74f27f414c280955637..dbb65e4eb7601877004c3bcf04248158ad2dac32 100644
--- a/tools/dom/templates/immutable_list_mixin.darttemplate
+++ b/tools/dom/templates/immutable_list_mixin.darttemplate
@@ -187,4 +187,7 @@ $endif
List<$E> getRange(int start, int rangeLength) =>
Lists.getRange(this, start, rangeLength, <$E>[]);
+ Map<int, $E> asMap() =>
+ IterableMixinWorkaround.asMapList(this);
+
// -- end List<$E> mixins.
« tests/corelib/list_as_map_test.dart ('K') | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698