Skip to content

Fix an edge case in AccessUseDefChainCloner #38792

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 1 commit into from
Aug 7, 2021

Conversation

meg-gupta
Copy link
Contributor

The cloner cannot handle begin_access yet. Handle this case so that canCloneUseDefChain does not assert.

@meg-gupta meg-gupta requested a review from atrick August 6, 2021 23:21
@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

This is the problem with failing to preserve access markers. We have countless places in the code that break in rare cases and now require fixing before we can preserve the markers.

In this case, we can live with the bailout. In a separate PR I'll move the canClone check until after we know that the access marker would also need to be cloned (which is not the situation in this test case).

In the long run, the cloner will need to know how to create access scopes.

@meg-gupta meg-gupta merged commit 9bb0d94 into swiftlang:main Aug 7, 2021
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