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

Unified Diff: sdk/lib/_collection_dev/iterable.dart

Issue 12401002: Make List.from and Iterable.toList default to not growable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/_collection_dev/iterable.dart
diff --git a/sdk/lib/_collection_dev/iterable.dart b/sdk/lib/_collection_dev/iterable.dart
index 40e2891a5de090b6dbb0be3fd838bd11e9e5a59e..daad6af71c16d79ce09de411b11009973c7384a6 100644
--- a/sdk/lib/_collection_dev/iterable.dart
+++ b/sdk/lib/_collection_dev/iterable.dart
@@ -219,7 +219,7 @@ abstract class ListIterable<E> extends Iterable<E> {
Iterable<E> takeWhile(bool test(E element)) => super.takeWhile(test);
- List<E> toList({ bool growable: false }) {
+ List<E> toList({ bool growable: true }) {
List<E> result;
if (growable) {
result = new List<E>()..length = length;
@@ -681,7 +681,7 @@ class EmptyIterable<E> extends Iterable<E> {
Iterable<E> takeWhile(bool test(E element)) => this;
- List toList({ bool growable: false }) => growable ? <E>[] : new List<E>(0);
+ List toList({ bool growable: true }) => growable ? <E>[] : new List<E>(0);
Set toSet() => new Set<E>();
}
« no previous file with comments | « samples/third_party/dromaeo/Suites.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/js_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698