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

Unified Diff: sdk/lib/internal/list.dart

Issue 315173005: Add "last" setter to List. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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: sdk/lib/internal/list.dart
diff --git a/sdk/lib/internal/list.dart b/sdk/lib/internal/list.dart
index 473a87a622cc8b947c3b208c4928a84ef18fa85f..afba6cbd7be45e24516b8af06d77c0bd90722deb 100644
--- a/sdk/lib/internal/list.dart
+++ b/sdk/lib/internal/list.dart
@@ -110,6 +110,11 @@ abstract class UnmodifiableListMixin<E> implements List<E> {
"Cannot change the length of an unmodifiable list");
}
+ void set last(E value) {
+ throw new UnsupportedError(
+ "Cannot modify an unmodifiable list");
+ }
+
/** This operation is not supported by an unmodifiable list. */
void setAll(int at, Iterable<E> iterable) {
throw new UnsupportedError(

Powered by Google App Engine
This is Rietveld 408576698