mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 05:36:49 +00:00
a1783a9c34
The current `String.fromCharCodes` behavior, throwing if `start` or `end` is larger than the length of the `charCodes` iterable, is inconsistent with the argument being an `Iterable<int>`, which the user is not expected to know the length of. Most other operations that accepts or produces an `Iterable` and restricts it to a range, will allow the range to exceed the length of the iterable, acting like `.take(end).skip(start)`, just without needing to create wrappers that hide the original value. (`List.setRange` is another exception, and should probably be fixed by allowing the range to be partially filled, since it's too hard to change it to require a `List` argument.) Fixes #50253, #53937 Tested: Added to `corelib/string_fromcharcodes_test.dart` Bug: https://dartbug.com/53937, https://dartbug.com/50253, https://dartbug.com/23282 Change-Id: Ie19c5fa8e715ea1c58c9c77c247f2a563654c1aa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333921 Commit-Queue: Lasse Nielsen <lrn@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Reviewed-by: Stephen Adams <sra@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Ömer Ağacan <omersa@google.com> |
||
---|---|---|
.. | ||
annotations.dart | ||
bigint.dart | ||
bool.dart | ||
comparable.dart | ||
core.dart | ||
core_sources.gni | ||
date_time.dart | ||
double.dart | ||
duration.dart | ||
enum.dart | ||
errors.dart | ||
exceptions.dart | ||
function.dart | ||
identical.dart | ||
int.dart | ||
invocation.dart | ||
iterable.dart | ||
iterator.dart | ||
list.dart | ||
map.dart | ||
null.dart | ||
num.dart | ||
object.dart | ||
pattern.dart | ||
print.dart | ||
record.dart | ||
regexp.dart | ||
set.dart | ||
sink.dart | ||
stacktrace.dart | ||
stopwatch.dart | ||
string.dart | ||
string_buffer.dart | ||
string_sink.dart | ||
symbol.dart | ||
type.dart | ||
uri.dart | ||
weak.dart |