Skip to content

Sema: Fix crash-on-invalid with 'let' property in protocol [5.1] #25146

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

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
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov requested a review from rjmccall May 30, 2019 19:24
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9c1c3d0db4754eb8cc990b392c450e26f8ac5798

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 9c1c3d0db4754eb8cc990b392c450e26f8ac5798

@slavapestov slavapestov force-pushed the protocol-requirement-accessor-crash-5.1 branch from 9c1c3d0 to e844db1 Compare May 30, 2019 21:30
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e844db11c7acc78d5ca06a3cff2f89b6e1aa662a

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-5.1 branch from e844db1 to 8ca363b Compare May 30, 2019 22:23
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e844db11c7acc78d5ca06a3cff2f89b6e1aa662a

@slavapestov slavapestov merged commit 7dc4478 into swiftlang:swift-5.1-branch 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