Open mattmassicotte opened 4 weeks ago
Ok, partially what is happening here is that String is Sendable, but NSString is not.
Hmm... so what is actually happening here is that we are using a fix_lifetime to guarantee that the bridged NSString stays around long enough and we are treating a fix_lifetime as a real require use. That being said, perhaps, we shouldn't actually treat it that way
Description
I'm having a very difficult time making an Objective-C API that interoperates with Swift. Specifcally, something is going wrong with my use of
NSString
here.Reproduction
try 1:
try 2:
Expected behavior
I would have expected both of these versions to bridge NSString to String and just work fine. It seems like that's happening, but in a way that isn't keeping isolation checking happy.
Environment
swift-driver version: 1.113 Apple Swift version 6.0 (swiftlang-6.0.0.7.6 clang-1600.0.24.1) Target: arm64-apple-macosx14.0
Additional information
No response