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

Unified Diff: pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart

Issue 2771953004: Add patch code for List.filled growable param (Closed)
Patch Set: rebase Created 3 years, 9 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 | « pkg/dev_compiler/test/not_yet_strong_tests.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
index 73bd6e5819ee2fef4068fdba65cc12fa8a88a4b5..ba805ac223931a35673c47f7f9724a40979052af 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
@@ -331,14 +331,15 @@ class List<E> {
}
@patch
- factory List.filled(int length, E fill) {
+ factory List.filled(int length, E fill, {bool growable: true}) {
List<E> result = new List<E>(length);
if (length != 0 && fill != null) {
for (int i = 0; i < result.length; i++) {
result[i] = fill;
}
}
- return result;
+ if (growable) return result;
+ return makeListFixedLength/*<E>*/(result);
}
@patch
« no previous file with comments | « pkg/dev_compiler/test/not_yet_strong_tests.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698