Some of the tests in KVOKeyPaths.swift check problems that were not fixed
until Swift 5.1 so they are not expected to pass when running with the
5.0 libraries.
rdar://problem/50173830
This reproposes @lilyball’s fixes in https://github.com/apple/swift/pull/20103 while adding her fix to ensure observations are removed before observed objects in 32-bit testing.
Test to make sure the `String -> KeyPath` table used for the
`NSKeyValueObservingCustomization` callbacks isn't screwed up by
observing another object's property with the same name from within the
callbacks.
Test `NSSortDescriptor.keyPath` to ensure it's also not screwed up by
creating sort descriptors for the same property on different objects.
Completely mechanical changes:
- Explicit @objc in a few places
- Some imported APIs changed
- For the mix-and-match tests, just test version 4/5 instead of 3/4
Keep the _NSKeyValueObservation in the runtime name, since we need to avoid colliding with the name used in the pre-ABI-stable libraries.
rdar://problem/44914709