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
swift-ci opened this issue
Mar 4, 2019
· 6 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
The problem has to do with referring to protocol extension properties across module boundaries. You may be able to work around it by wrapping or redefining `primaryText` in a protocol extension local to the module that forms the key path.
It looks like it also avoids the problem if you refer to the property on a type that conforms to Theme rather than on Theme itself. You could try this:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Attachment: Download
Environment
Xcode 10.2 beta 4
macOS 10.14.3
Swift 5 compiler, Swift 5 mode (also repros with 4.2 mode)
Additional Detail from JIRA
md5: b8e0a3634ca71355284a609568ffb0b6
Issue Description:
We've found a weird compiler crash during SIL emission. Verified still exists with Xcode 10.2 beta 4 using the Swift 5 compiler.
You need:
A protocol inside another framework
That protocol is @objc
An extension on that protocol with a property
A function that takes the KeyPath as an argument
To call the function, passing in the property from the extension
Here's the sample case:
In App:
In a Dynamic Framework (called `ThemeModule` in this sample):
And the Segmentation Fault:
I have attached the Sample Project as well.
The text was updated successfully, but these errors were encountered: