Skip to content

Sema: Fix crash-on-invalid with 'let' property in protocol #25145

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

Conversation

slavapestov
Copy link
Contributor

The protocol requirement storage declaration might not have accessors
created for it if it was incorrectly declared as a 'let' property
inside the protocol.

There might be other cases where we had failed to synthesize the
requirement's accessors, and crash here; this should hopefully make
all of those more robust.

Fixes rdar://problem/48994271.

@slavapestov slavapestov requested a review from rjmccall May 30, 2019 19:13
The protocol requirement storage declaration might not have accessors
created for it if it was incorrectly declared as a 'let' property
inside the protocol.

There might be other cases where we had failed to synthesize the
requirement's accessors, and crash here; this should hopefully make
all of those more robust.

Fixes <rdar://problem/48994271>.
@slavapestov slavapestov force-pushed the protocol-requirement-accessor-crash branch from e6a5573 to 5e39f03 Compare May 30, 2019 20:46
Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

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

LGTM

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit 5aca779 into swiftlang:master May 31, 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