Skip to content

Commit bbd571f

Browse files
Xavier Jurado Cristobalfacebook-github-bot
authored andcommitted
Make ExecuTorch build with Xcode 26 beta toolchain and InferSendableFromCaptures enabled
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
1 parent 07c8f0f commit bbd571f

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)