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

Unified Diff: sdk/lib/_internal/compiler/js_lib/core_patch.dart

Issue 838463002: Change List/Set/Map/Queue.from constructrs to accept any iterable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
Index: sdk/lib/_internal/compiler/js_lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/core_patch.dart b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
index c0180d8322342b025b898e259fe3fcfa0c2307cb..29ee7787287406b79905d8f436547aa66d6ec302 100644
--- a/sdk/lib/_internal/compiler/js_lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
@@ -259,9 +259,9 @@ class List<E> {
}
@patch
- factory List.from(Iterable other, { bool growable: true }) {
+ factory List.from(Iterable elements, { bool growable: true }) {
List<E> list = new List<E>();
- for (E e in other) {
+ for (E e in elements) {
list.add(e);
}
if (growable) return list;

Powered by Google App Engine
This is Rietveld 408576698