Skip to content

SILGen: Relax assertion that incorrectly tripped on lowered opaque capture types. #33945

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

Merged

Conversation

jckarter
Copy link
Contributor

When lowering the SILConstantInfo for a closure implementation type with captures, we are more conservative about
substituting opaque types in the capture, since the underlying types may only be available in the local context. This means
the SILConstantInfo type may not in fact be exactly what you get from SILFunction::getFunctionTypeInContext referencing
the implementation function from its originating context, since those opaque types will be substituted in the local context.

Fixes SR-13480 | rdar://problem/68159831.

…pture types.

When lowering the SILConstantInfo for a closure implementation type with captures, we are more conservative about
substituting opaque types in the capture, since the underlying types may only be available in the local context. This means
the SILConstantInfo type may not in fact be exactly what you get from `SILFunction::getFunctionTypeInContext` referencing
the implementation function from its originating context, since those opaque types will be substituted in the local context.

Fixes SR-13480 | rdar://problem/68159831.
@jckarter
Copy link
Contributor Author

@swift-ci Please test

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jckarter jckarter changed the base branch from master to main September 28, 2020 21:12
@jckarter jckarter merged commit 6a597d4 into swiftlang:main Sep 28, 2020
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.

2 participants