Skip to content
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

Diagnose *all* cases where a subclass fails to override a required init #70236

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

DougGregor
Copy link
Member

In cases where a subclass was unable to synthesize any initializers (for example, because there were missing designated initializers in the superclass), we were skipping checking of superclass required initializers. This meant that we would silently accept subclasses that cannot be initialized directly (that would produce an error), but could at runtime be initialized via a required initializer... that didn't account for the subclass.

Fixes the original problem from #69965.

In cases where a subclass was unable to synthesize any initializers
(for example, because there were missing designated initializers in the
superclass), we were skipping checking of superclass required
initializers. This meant that we would silently accept subclasses that
cannot be initialized directly (that would produce an error), but
could at runtime be initialized via a required initializer... that
didn't account for the subclass.

Fixes the original problem from swiftlang#69965,
but not the most minimal one.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

Linux failure is "No space left on device"

@DougGregor
Copy link
Member Author

@swift-ci please clean smoke test Linux

@DougGregor DougGregor merged commit 651d4f8 into swiftlang:main Dec 5, 2023
@DougGregor DougGregor deleted the required-inits-69965 branch December 5, 2023 20:53
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