[SR-11527] App crash with outlined init w/ copy of Any?
#53928
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
run-time crash
Bug → crash: Swift code crashed during execution
Environment
Xcode 11A1027
macOS 10.14.6
Additional Detail from JIRA
md5: 3676ba883a040c2d7a539c666a7d81e3
Issue Description:
An app built w/ Swift 5.1 crashes with `outlined init w/ copy of Any?`.
Code in question (https://github.com/DirectToSwift/CoreDataToSwiftUI/blob/develop/Sources/DirectToSwiftUI/Support/EquatableType.swift#L57):
To repro:
Build & run (iOS app, iPhone 11 Pro Max as target)
BTW: This happened w/ that exact commit (97955e694ba3f8e26663cb5b2fb3895bd23f46b7), the commit of the app before works fine. The relevant change is this:
Before I was using a trampoline (the `.p`) to access the managed object using a dynamic keypath, this works (but I want to get away from it):
I played around with it, and it related to the result returned by the key path:
The key path in question is captured by the closure.
BT:
The text was updated successfully, but these errors were encountered: