Skip to content

SIL: Fix type lowering of unowned reference to class-bound generic parameter [5.4] #35403

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

slavapestov
Copy link
Contributor

Unowned references lower as address-only or loadable, depending on
whether the underlying class type is known to be native Swift or
not.

In the case where we were lowering an interface type, we would
unconditionally erase the type to AnyObject, producing an incorrect
lowering when the generic signature constrained the type parameter
to a native Swift class.

Fixes rdar://problem/73083179.

…rameter

Unowned references lower as address-only or loadable, depending on
whether the underlying class type is known to be native Swift or
not.

In the case where we were lowering an interface type, we would
unconditionally erase the type to AnyObject, producing an incorrect
lowering when the generic signature constrained the type parameter
to a native Swift class.

Fixes <rdar://problem/73083179>.
@slavapestov slavapestov requested a review from a team as a code owner January 13, 2021 04:59
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@jckarter Does this look OK for 5.4?

@slavapestov slavapestov requested a review from jckarter January 13, 2021 05:00
@slavapestov slavapestov changed the title SIL: Fix type lowering of unowned reference to class-bound generic parameter SIL: Fix type lowering of unowned reference to class-bound generic parameter [5.4] Jan 13, 2021
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 2139ea7

@slavapestov
Copy link
Contributor Author

@swift-ci Please test Linux

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.

Looks good, thanks Slava!

@slavapestov slavapestov merged commit 406291b into swiftlang:release/5.4 Jan 13, 2021
@AnthonyLatsis AnthonyLatsis added swift 5.4 🍒 release cherry pick Flag: Release branch cherry picks 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants