Skip to content

[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

Conversation

aschwaighofer
Copy link
Contributor

…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.

…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
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test source compatibility

@aschwaighofer
Copy link
Contributor Author

@swift-ci please nominate

@aschwaighofer
Copy link
Contributor Author

@shahmishal @najacque Nominate seems to be down.

@shahmishal
Copy link
Member

@swift-ci please nominate

@aschwaighofer
Copy link
Contributor Author

The source compat failures are the same 11 failures that are also on the current swift-4.1-branch:

https://ci.swift.org/view/swift-4.1-branch/job/swift-4.1-source-compat-suite/158/artifact/swift-source-compat-suite/

fatal: unable to access 'https://github.com/vapor/crypto.git/': error setting certificate verify locations:
  CAfile: /etc/ssl/cert.pem
  CApath: none

@aschwaighofer
Copy link
Contributor Author

swift-5.0-branch merged: #14235

@aschwaighofer aschwaighofer merged commit 3e6b75a into swiftlang:swift-4.1-branch Jan 29, 2018
@najacque
Copy link
Contributor

@swift-ci please nominate

@najacque
Copy link
Contributor

@aschwaighofer I'm investigating the nomination issue.

@aschwaighofer
Copy link
Contributor Author

@najacque Thanks. I have manually nominated this in the meantime.

@najacque
Copy link
Contributor

@aschwaighofer I found the issue -- you had a space in your radar URL, so it wasn't recognized as valid.

@aschwaighofer
Copy link
Contributor Author

@najacque Oh. Ok thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants