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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart

Issue 12431010: Fix String.fromCharCodes to work with iterables. (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
Index: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index 1da20f6e90c14bd70e32cbfd216d45c2efffb1d7..4f051b92df2f690d69a7b668fbece9b897519fc3 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -193,9 +193,8 @@ patch class List<E> {
patch class String {
- patch factory String.fromCharCodes(List<int> charCodes) {
+ patch factory String.fromCharCodes(Iterable<int> charCodes) {
if (!isJsArray(charCodes)) {
- if (charCodes is !List) throw new ArgumentError(charCodes);
charCodes = new List.from(charCodes);
floitsch 2013/03/05 14:14:04 assert that it is a jsArray. Same: maybe add comme
}
return Primitives.stringFromCharCodes(charCodes);

Powered by Google App Engine
This is Rietveld 408576698