Skip to content

[Serialization] Drop overriding initializers with missing bases. #8715

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

jrose-apple
Copy link
Contributor

This is the same as the last few commits (#8580, #8698), but with the additional complication of designated initializers affecting other behavior around the type. In particular, convenience initializers cannot be invoked on subclasses if the designated initializers are not all present on the subclass. If a designated initializer is dropped, it's not possible to satisfy that.

It would be nice to do better here, since a class's initializers are mostly independent of the superclass's initializers. Unfortunately, it still affects whether this class can inherit convenience initializers, as well as vtable layout. This is conservative, at least.

This PR currently slurps in #8708, building on the same feature.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 84fa23c967fcee6e1741ebd5a20327601d7f9fef
Test requested by - @jrose-apple

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test Linux

The next commit is going to want to look at the container whose
members are being loaded.
This is the same as the last few commits, but with the additional
complication of designated initializers affecting other behavior
around the type. In particular, convenience initializers cannot be
invoked on subclasses if the designated initializers are not all
present on the subclass. If a designated initializer is dropped, it's
not possible to satisfy that.

It would be nice to do better here, since a class's initializers are
mostly independent of the superclass's initializers. Unfortunately, it
still affects whether /this/ class can inherit convenience
initializers, as well as vtable layout. This is conservative, at
least.
@jrose-apple jrose-apple force-pushed the deserialization-recovery-for-inits branch from 84fa23c to abdaaef Compare April 24, 2017 18:54
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple jrose-apple merged commit f3f8b62 into swiftlang:master Apr 24, 2017
@jrose-apple jrose-apple deleted the deserialization-recovery-for-inits branch April 24, 2017 20:58
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