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

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

Issue 1939093003: List.unmodifiable (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: /*<E>*/ Created 4 years, 8 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 | « tool/input_sdk/lib/internal/list.dart ('k') | tool/input_sdk/patch/internal_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/patch/core_patch.dart
diff --git a/tool/input_sdk/patch/core_patch.dart b/tool/input_sdk/patch/core_patch.dart
index 52ddebdc8205f0098a60387800b92fa3c3ca3566..07ba6eba39dbcac58611f9ceb602172e837f4c76 100644
--- a/tool/input_sdk/patch/core_patch.dart
+++ b/tool/input_sdk/patch/core_patch.dart
@@ -264,7 +264,13 @@ class List<E> {
list.add(e);
}
if (growable) return list;
- return makeListFixedLength(list);
+ return makeListFixedLength/*<E>*/(list);
+ }
+
+ @patch
+ factory List.unmodifiable(Iterable elements) {
+ List result = new List<E>.from(elements, growable: false);
+ return makeFixedListUnmodifiable/*<E>*/(result);
}
}
« no previous file with comments | « tool/input_sdk/lib/internal/list.dart ('k') | tool/input_sdk/patch/internal_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698