Skip to content

SIL: Allow lowering Optional<T> against a nested type of an opaque result type [5.5] #38377

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

slavapestov
Copy link
Contributor

Only the root archetype is a OpaqueTypeArchetypeType; the nested types are
NestedArchetypeType. Use the correct predicate here.

Also remove a dead check in tuple lowering; the isa<OpaqueTypeArchetypeType>()
check is dominated by isTypeParameterOrOpaqueArchetype() which is always
true if isa<OpaqueTypeArchetypeType>() is true anyway.

Fixes rdar://problem/79597666.

…sult type

Only the root archetype is a OpaqueTypeArchetypeType; the nested types are
NestedArchetypeType. Use the correct predicate here.

Also remove a dead check in tuple lowering; the isa<OpaqueTypeArchetypeType>()
check is dominated by isTypeParameterOrOpaqueArchetype() which is always
true if isa<OpaqueTypeArchetypeType>() is true anyway.

Fixes rdar://problem/79597666.
@slavapestov slavapestov requested a review from a team as a code owner July 13, 2021 22:38
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks Slava!

@airspeedswift
Copy link
Member

Original: #38376

@slavapestov slavapestov merged commit a8c2aaa into swiftlang:release/5.5 Jul 14, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants