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

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

Issue 14065011: Implement getRange (returning an Iterable). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes and status-file update. Created 7 years, 8 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 a2c1a99b339ca6100ad9381ea07f08ef580e36a6..0af41e945c2cb7d6ef265540e63c73bbae6c2e3c 100644
--- a/tools/dom/templates/immutable_list_mixin.darttemplate
+++ b/tools/dom/templates/immutable_list_mixin.darttemplate
@@ -188,14 +188,14 @@ $endif
throw new UnsupportedError("Cannot insertRange on immutable List.");
}
+ Iterable<$E> getRange(int start, int end) =>
+ IterableMixinWorkaround.getRangeList(this, start, end);
+
List<$E> sublist(int start, [int end]) {
if (end == null) end = length;
return Lists.getRange(this, start, end, <$E>[]);
}
- List<$E> getRange(int start, int rangeLength) =>
- sublist(start, start + rangeLength);
-
Map<int, $E> asMap() =>
IterableMixinWorkaround.asMapList(this);

Powered by Google App Engine
This is Rietveld 408576698