You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid specialization of unsafeBitCast(_:to:) when getting an error's backtrace. (#414)
It appears the Swift compiler has recently started specializing
`unsafeBitCast(_:to:)` more aggressively than before, resulting in a
call to that function in `Backtrace.init(forFirstThrowOf:)` crashing
because the size of the input error (expected to be an existential box
of type `NSError` or `SwiftError`, i.e. actually an object) doesn't
match the size of `AnyObject`.
This PR explicitly asks the compiler not to specialize
`unsafeBitCast(_:to:)` quite so precisely, preserving the intended
semantics.
(This method is already known to contain non-zero quantities of "wat.")
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
0 commit comments