Skip to content

Commit 924bbf8

Browse files
xavierjuradoXavier Jurado Cristobalshoumikhin
authored
Make ExecuTorch build with Xcode 26 beta toolchain and InferSendableFromCaptures enabled (#12539)
Summary: Fix a bunch of staging builds that stopped working after enabling `InferSendableFromCaptures` globally. This is likely caused by a bug in Xcode's 26 toolchain, although I've not been able to reproduce it in an isolated sample. Switching from `Array.init` to `{ Array($0) }` solves the issue and keeps the code building without warnings in all toolchain versions. Differential Revision: D78406265 Co-authored-by: Xavier Jurado Cristobal <[email protected]> Co-authored-by: Anthony Shoumikhin <[email protected]>
1 parent f49c3e4 commit 924bbf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extension/apple/ExecuTorch/Exported/ExecuTorch+Tensor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ public extension Tensor {
832832
/// - Returns: An array of scalars of type `T`.
833833
/// - Throws: An error if the underlying data cannot be accessed.
834834
func scalars() throws -> [T] {
835-
try withUnsafeBytes(Array.init)
835+
try withUnsafeBytes { Array($0) }
836836
}
837837
}
838838

0 commit comments

Comments
 (0)