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

Unified Diff: runtime/lib/array.dart

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. 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: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index 1441dc2a50e4b34a97de693994693f7f365f85ea..fa47027984ba7cd29b9356171f4851309cbbb3fc 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -228,8 +228,8 @@ class _ObjectArray<E> implements List<E> {
E max([int compare(E a, E b)]) => IterableMixinWorkaround.max(this, compare);
- List<E> toList() {
- return new List<E>.from(this);
+ List<E> toList({ bool growable: false}) {
+ return new List<E>.from(this, growable: growable);
}
Set<E> toSet() {
@@ -467,8 +467,8 @@ class _ImmutableArray<E> implements List<E> {
E max([int compare(E a, E b)]) => IterableMixinWorkaround.max(this, compare);
- List<E> toList() {
- return new List<E>.from(this);
+ List<E> toList({ bool growable: false }) {
+ return new List<E>.from(this, growable: growable);
}
Set<E> toSet() {

Powered by Google App Engine
This is Rietveld 408576698