Skip to content

Commit 799c7d4

Browse files
authored
Merge pull request #21997 from airspeedswift/closed-range-init
2 parents 56888e2 + 4363f61 commit 799c7d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/core/ClosedRange.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ extension ClosedRange where Bound: Strideable, Bound.Stride : SignedInteger {
433433
/// An equivalent range must be representable as a closed range.
434434
/// For example, passing an empty range as `other` triggers a runtime error,
435435
/// because an empty range cannot be represented by a closed range instance.
436+
@inlinable
436437
public init(_ other: Range<Bound>) {
437438
_precondition(!other.isEmpty, "Can't form an empty closed range")
438439
let upperBound = other.upperBound.advanced(by: -1)

0 commit comments

Comments
 (0)