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

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

Issue 50733002: Update List constructor documentation. Say that null is not a length. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add tests. Created 7 years, 2 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 | « no previous file | tests/corelib/list_test.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 a71dc11eb4f7a2c2f93f11182c923b0365020bb2..acc0ae83d4f4f3c713f4cb1dd6200b190caec548 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -60,7 +60,7 @@ abstract class List<E> implements Iterable<E>, EfficientLength {
* growableList.length; // 0;
* growableList.length = 3;
*
- * An error occurs if [length] is negative.
+ * The [length] must not be negative or null, if it is provided.
*/
external factory List([int length]);
@@ -69,6 +69,8 @@ abstract class List<E> implements Iterable<E>, EfficientLength {
* value at each position with [fill]:
*
* new List<int>.filled(3, 0); // [0, 0, 0]
+ *
+ * The [length] must not be negative or null.
Anders Johnsen 2013/10/30 10:31:27 "The [length] must be a positive integer." ? and
*/
external factory List.filled(int length, E fill);
« no previous file with comments | « no previous file | tests/corelib/list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698