mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We can only do this for two reasons: 1. There is a code path that should have gone through the non-exclusively borrowed self entrypoints, but they were not implemented. 2. We are trying to access self for an argument. By copying the value, we preserve invariants around ownership and also make it easy for DI to catch 2 and not blow up in the case of 1. It is better to error in DI incorrectly, than to hit an unreachable (especially since in non-assert builds, we don't trap at unreachables and just continue to the next function in the text segment). SR-5682 rdar://35402738
34 KiB
34 KiB