Post

Replies

Boosts

Views

Activity

Reply to Swift compiler crash with Xcode 16 beta 5
We met this issue too. The compiler will crash once I access KeyPathComparator.keyPath. Maybe we can use keyPath to access keyPath: init(comparator: KeyPathComparator<RemoteComputer>) throws { let path = \KeyPathComparator<RemoteComputer>.keyPath let keyPath = comparator[keyPath: path] switch keyPath { case \RemoteComputer.readableName: self.init(type: .readableName, order: comparator.order) case \RemoteComputer.lastConnectionDate: self.init(type: .lastConnectionDate, order: comparator.order) case \RemoteComputer.numberOfConnections: self.init(type: .numberOfConnections, order: comparator.order) default: print("Unsupported keyPath: \(keyPath)") throw ItemOrderError.unsupportedKeyPath } }
Aug ’24