Skip to content

Minor improvements to SIL verifier #21504

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 9 commits into from
Jan 2, 2019

Conversation

slavapestov
Copy link
Contributor

Add some checks that we're not doing non-resilient things to resilient types inside inlinable functions, and fix two bugs caught by this.

@objc @inlinable deinit {
print("bye")
}
@objc deinit
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jrose-apple @objc is a no-op on a deinit isn't it? Should we warn and remove the attribute?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is how it gets printed right now, so we have to handle reading it back in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, so it would be a warning at best. I just think it might confuse people ("do I need to @objc my deinit if my class is @objc, or otherwise some weird edge case won't work?" "No, it actually does nothing")

Copy link
Contributor

@jrose-apple jrose-apple Dec 21, 2018

Choose a reason for hiding this comment

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

*shrug* A warning sounds fine. I'd also be happy if we (additionally) didn't print it here.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - a6e3464469c7d88d2ec94c1c1dcd13833de67da1

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a6e3464469c7d88d2ec94c1c1dcd13833de67da1

@slavapestov
Copy link
Contributor Author

Source compatibility “failures” are UPASS

@slavapestov slavapestov merged commit 04ce7ab into swiftlang:master Jan 2, 2019
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