Skip to content

Commit e155cae

Browse files
committed
Boolean || and && operators should be declared as @_transparent.
This recovers the performance reported in [SR-2247](https://bugs.swift.org/browse/SR-2247) and rdar://27645751
1 parent 1f2b626 commit e155cae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/core/Bool.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ extension Bool {
217217
/// - Parameters:
218218
/// - lhs: The left-hand side of the operation.
219219
/// - rhs: The right-hand side of the operation.
220+
@_transparent
220221
@inline(__always)
221222
public static func && (lhs: Bool, rhs: @autoclosure () throws -> Bool) rethrows
222223
-> Bool{
@@ -256,6 +257,7 @@ extension Bool {
256257
/// - Parameters:
257258
/// - lhs: The left-hand side of the operation.
258259
/// - rhs: The right-hand side of the operation.
260+
@_transparent
259261
@inline(__always)
260262
public static func || (lhs: Bool, rhs: @autoclosure () throws -> Bool) rethrows
261263
-> Bool {

0 commit comments

Comments
 (0)