Skip to content

Deserialization recovery for subscripts and properties with missing bases #8698

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

jrose-apple
Copy link
Contributor

This is still fairly simple: it only handles a case where a subscript or property disappears or changes its type wholesale. If something happens to just the setter, we'll still consider it a fatal error and crash.

The only major remaining declaration kind that may be missing an override now is initializers. Those require more thought, however, since the presence or absence of initializers affects the behavior of subclasses.

This only handles cases where a subscript disappears wholesale;
if one becomes read-only (for whatever terrible reason) the
compiler will still crash.
Like the previous commit, but with added trickiness because we also
serialize the form of the PatternBindingDecl a property came from.
Make getPattern handle a failure in the simple case that overrides
use, and pass that up to the PatternBindingDecl initialization. (This
can result in zero-element PatternBindingDecls, but that's fine.)

'getPattern' is also a change from 'maybeGetPattern', but every caller
knows how many patterns it expects, so accomodating the "maybe" case
is no longer important.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple jrose-apple merged commit 5659f48 into swiftlang:master Apr 11, 2017
@jrose-apple jrose-apple deleted the deserialization-recovery-for-subscripts-and-vars branch April 11, 2017 20:06
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.

1 participant