-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[4.1] SIL : Use the enum 's generic signature and the payloads type f… #14234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.1] SIL : Use the enum 's generic signature and the payloads type f… #14234
Conversation
…or an indirect enum payload's box type. i.e for: enum Indirect<T> { indirect cast payload(first: T, second :T) } let _ = Indirect<X> The payload's SIL box type will be: $<t_0_0> { var (first: t_0_0, second: t_0_0) } <X> rdar: //36799330
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci please nominate |
@shahmishal @najacque Nominate seems to be down. |
@swift-ci please nominate |
The source compat failures are the same 11 failures that are also on the current swift-4.1-branch:
|
swift-5.0-branch merged: #14235 |
@swift-ci please nominate |
@aschwaighofer I'm investigating the nomination issue. |
@najacque Thanks. I have manually nominated this in the meantime. |
@aschwaighofer I found the issue -- you had a space in your radar URL, so it wasn't recognized as valid. |
@najacque Oh. Ok thanks. |
…or an indirect enum payload's box type.
i.e for:
enum Indirect {
indirect cast payload(first: T, second :T)
}
let _ = Indirect
The payload's SIL box type will be:
$<t_0_0> { var (first: t_0_0, second: t_0_0) }
rdar: //36799330
Explanation: We were lowering SIL box types for enums as a generic field without copying the enum's payloads field type to the field type we used for the box. This resulted in lowered types ending up in the substitution list of the box causing assertion failures in the SIL verifier when we specialized closure types into the enum.
Scope: This issue has been there since modeling SIL box types where introduced AFAICT.
Risk: Low. Only affects indirect enum types.
Reviewed: Joe Groff
Testing: Swift CI test added. Verified that failing project compiles successfully with this change.