Skip to content

Small IsFinalRequest cleanup #25426

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 4 commits into from
Jun 13, 2019

Conversation

slavapestov
Copy link
Contributor

Instead of adding a FinalAttr directly let's have IsFinalRequest determine that lazy property and property wrapper storage is final.

This fixes a bug, apparently only on master and not swift-5.1-branch, where the property wrapper backing storage was not final.

… wrappers as 'final'

By calling isFinal() first in makeFinal(), we were triggering
computation of IsFinalRequest and caching a value of 'false'.

With lazy properties, we did direct storage access, and no
accessors were synthesized anyway, but add a test for that.

With property wrappers this now means the backing storage
property is final, as intended (?).
@slavapestov slavapestov requested review from xymus and DougGregor June 13, 2019 07:42
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov force-pushed the final-request-cleanup branch from bf1bd38 to 95c221a Compare June 13, 2019 08:03
@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

apple/swift-lldb#1676
@swift-ci Please smoke test macOS

Copy link
Contributor

@xymus xymus left a comment

Choose a reason for hiding this comment

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

Good job on removing the remaining makeFinals!

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@slavapestov slavapestov merged commit 90f6363 into swiftlang:master Jun 13, 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.

2 participants