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

Unified Diff: sdk/lib/core/list.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
« no previous file with comments | « sdk/lib/core/iterable.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/list.dart
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 1e10e864537f3c27883771a26154bcdaf8cec46f..a515c1f8b4ba3bcc8ac078e9e5e152a437e3450d 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -67,7 +67,7 @@ abstract class List<E> implements Collection<E> {
* The returned list is growable if [growable] is true, otherwise it's
* a fixed length list.
*/
- factory List.from(Iterable other, { bool growable: false }) {
+ factory List.from(Iterable other, { bool growable: true }) {
List<E> list = new List<E>();
for (E e in other) {
list.add(e);
@@ -91,7 +91,7 @@ abstract class List<E> implements Collection<E> {
* The created length's length is fixed unless [growable] is true.
*/
factory List.generate(int length, E generator(int index),
- { bool growable: false }) {
+ { bool growable: true }) {
List<E> result;
if (growable) {
result = <E>[]..length = length;
« no previous file with comments | « sdk/lib/core/iterable.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698