Skip to content

Commit ec6074f

Browse files
maranixCommit Queue
authored andcommitted
[core/lib]: remove redundant null check
Closes #62132 GitOrigin-RevId: 81189c7 Change-Id: Ica40cc4799857c7cff2284ffa6915c8e06b0dcf3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465220 Reviewed-by: Lasse Nielsen <[email protected]> Commit-Queue: Lasse Nielsen <[email protected]>
1 parent 3124714 commit ec6074f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sdk/lib/core/list.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,7 @@ abstract interface class List<E> implements Iterable<E>, _ListIterable<E> {
284284
]) {
285285
start ??= 0;
286286
end = RangeError.checkValidRange(start, end, source.length);
287-
if (end == null) {
288-
// TODO(dart-lang/language#440): Remove when promotion works.
289-
throw "unreachable";
290-
}
287+
291288
int length = end - start;
292289
if (target.length < at + length) {
293290
throw ArgumentError.value(

0 commit comments

Comments
 (0)