I wonder if Xcode should really be enabling that warning if it produces different results on macOS 14 vs 15.
Yeah this would be good. I think the current situation could really use some adjustment prior to 6.0 final, if that's still possible.
Users will try to isolate data using actors and dispatch queues, which in theory is compatible with the Apple SDK practice of registering delegate objects and queues to call them on. Because delegate methods have to be callable from Objective-C with their existing signatures, they have to be formally nonisolated and we dynamically check isolation using assertIsolated in the body. This is not too difficult to grasp and not an extremely uncommon use-case, I don't think.
So developers will do that, test their code on iOS 18 or macOS 15, and everything will work. Then they'll ship it and it'll crash for customers on older OSes. It won't make intuitive sense, and they won't be able to reproduce it until they notice that it's OS version-dependent. Even when they do, they'll see in the debugger that they're on the correct queue, but assumeIsolated is giving an unexpected result, and I bet a lot of them will blame themselves and feel that they just don't understand Swift Concurrency.
Even if they get past that hurdle and identify assumeIsolated as the culprit, there's no good answer right now for what they should do about it. There's the unsafeBitCast trick I used, but it's a very valid point that some of the runtime bookkeeping may be in an unexpected state because of that. But if that is no longer an option, I don't think developers will have any choice but to forgo actors with dispatch executors for these use-cases entirely until they can drop support for all but the not-even-released-yet round of Apple OS releases.
If it is truly not feasible to back-port the current behaviour, an unsafeAssumeIsolated method to replace the unsafeBitCast (and update the runtime bookkeeping) should be looked at as a high-priority addition, IMO. We could combine that with our own versions of the executor 'complex equality' checks to effectively write our own back-ports for the executors we use.