Skip to content

[4.2] More errors instead of crashes for conditional conformances that are invalid or involve hard-to-resolve recursion #17385

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

huonw
Copy link
Contributor

@huonw huonw commented Jun 21, 2018

4.2 merge of #17356

@huonw huonw changed the base branch from master to swift-4.2-branch June 21, 2018 02:37
@huonw
Copy link
Contributor Author

huonw commented Jun 21, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 648459f008f343c065972b1c9ea80344a227465f

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 648459f008f343c065972b1c9ea80344a227465f

huonw added 2 commits June 21, 2018 13:39
This doesn't fix the fundamental problem of correctly handling such cases, but
it is better than the "error message" that occurred previously:

    Assertion failed: ((bool)typeSig == (bool)extensionSig && "unexpected generic-ness mismatch on conformance").

Fixes the crash rdar://problem/41281406 (that in
https://bugs.swift.org/browse/SR-6569 (rdar://problem/36068136)),
https://bugs.swift.org/browse/SR-8019 (rdar://problem/41216423) and
https://bugs.swift.org/browse/SR-7989 (rdar://problem/41126254).
…n error cases.

When we're trying to diagnose something, it's a bad look if we crash
instead. This changes the bad-associated-type recovery path to not require that
the conditional requirements have been computed, and instead detects that as a
possible error.

Fixes https://bugs.swift.org/browse/SR-8033.
@huonw huonw force-pushed the lazier-conditional-requirements-4.2 branch from 648459f to 8bf2823 Compare June 21, 2018 03:40
@huonw
Copy link
Contributor Author

huonw commented Jun 21, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 648459f008f343c065972b1c9ea80344a227465f

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 648459f008f343c065972b1c9ea80344a227465f

@huonw
Copy link
Contributor Author

huonw commented Jun 21, 2018

@swift-ci please test

@huonw
Copy link
Contributor Author

huonw commented Jun 21, 2018

@swift-ci please test source compatibility

@huonw huonw merged commit 0ca361f into swiftlang:swift-4.2-branch Jun 21, 2018
@huonw huonw deleted the lazier-conditional-requirements-4.2 branch June 22, 2018 23:20
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