Skip to content

A couple of small SILGen fixes #29197

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
merged 3 commits into from
Jan 15, 2020

Conversation

slavapestov
Copy link
Contributor

It's possible for a value of a non-trivial type to have no cleanup,
if the value was constructed from a no-payload enum case. Tweak
the assert to check the value's ownership instead of checking the
type.

Fixes <https://bugs.swift.org/browse/SR-12000>, <rdar://problem/58455443>.
@slavapestov slavapestov requested a review from jckarter January 14, 2020 22:15
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!

For resilient classes, we hide method symbols if possible, to
enforce that only resilient access patterns are used to call
and override methods.

Final methods can be referenced directly, however, but we were
incorrectly hiding them anyway if they were overrides. To consider
overrides differently here only makes sense in the non-resilient
case; in fact this was a regression from <rdar://problem/55559104>,
which fixed a bug with non-resilient classes by adding this check.

I tried to add comments and clean up the logic here a bit to be
less confusing in the future.

Fixes <rdar://problem/57864425>.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 7f4e5a5 into swiftlang:master Jan 15, 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