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

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

Issue 9956126: Fix for Issue 2399. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: supressions Created 8 years, 9 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 | « lib/dom/scripts/systemhtml.py ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/templates/immutable_list_mixin.darttemplate
diff --git a/lib/dom/templates/immutable_list_mixin.darttemplate b/lib/dom/templates/immutable_list_mixin.darttemplate
index befa0d71b7413662508dd1f5bf4893c0e2b686c3..d2e2c0adc0caac1a68c28eec7300232c4b43e93c 100644
--- a/lib/dom/templates/immutable_list_mixin.darttemplate
+++ b/lib/dom/templates/immutable_list_mixin.darttemplate
@@ -46,21 +46,30 @@
int indexOf($E element, [int start = 0]) =>
_Lists.indexOf(this, element, start, this.length);
- int lastIndexOf($E element, [int start = 0]) =>
- _Lists.lastIndexOf(this, element, start);
+ int lastIndexOf($E element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
$E last() => this[length - 1];
+ $E removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
+ }
+
// FIXME: implement these.
void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
+
void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
+
void insertRange(int start, int rangeLength, [$E initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
+
List<$E> getRange(int start, int rangeLength) =>
_Lists.getRange(this, start, rangeLength, <$E>[]);
« no previous file with comments | « lib/dom/scripts/systemhtml.py ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698