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

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

Issue 11817059: Fixes for a number of dart analyzer issues in dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Syncing to latest. Created 7 years, 11 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 | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f94ba1ca29fb4df2cc2fd3c216fe8ca8a4659eb3..bf2bf4cc8e7e2708e9928adef5a974f1da0f46d6 100644
--- a/tools/dom/templates/immutable_list_mixin.darttemplate
+++ b/tools/dom/templates/immutable_list_mixin.darttemplate
@@ -36,6 +36,9 @@ $endif
bool any(bool f($E element)) => Collections.any(this, f);
+ List<$E> toList() => new List<$E>.from(this);
+ Set<$E> toSet() => new Set<$E>.from(this);
+
bool get isEmpty => this.length == 0;
List<$E> take(int n) => new ListView<$E>(this, 0, n);
@@ -123,9 +126,9 @@ $endif
throw new StateError("More than one element");
}
- $E min([int compare($E a, $E b)]) => _Collections.minInList(this, compare);
+ $E min([int compare($E a, $E b)]) => Collections.min(this, compare);
- $E max([int compare($E a, $E b)]) => _Collections.maxInList(this, compare);
+ $E max([int compare($E a, $E b)]) => Collections.max(this, compare);
$E removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
« no previous file with comments | « 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