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

AST: Check return value of ProtocolConformance::getTypeWitness() #11076

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

slavapestov
Copy link
Contributor

This method returns an empty Type if the conformance is currently
being checked. The other caller of this method in the
GenericSignatureBuilder checked the return value and bailed out,
but one place did not.

This is probably not the right long-term fix, but it matches what
the other caller of getTypeWitness() does in this file.

I don't have a reduced test case either; the repro involves
building a specific revision of the standard library with a patch
applied. However, the fix can't really do any harm, since passing
an empty Type here quickly crashes.

Fixes rdar://problem/32296747, https://bugs.swift.org/browse/SR-4945.

This method returns an empty Type if the conformance is currently
being checked. The other caller of this method in the
GenericSignatureBuilder checked the return value and bailed out,
but one place did not.

This is probably not the right long-term fix, but it matches what
the other caller of getTypeWitness() does in this file.

I don't have a reduced test case either; the repro involves
building a specific revision of the standard library with a patch
applied. However, the fix can't really do any harm, since passing
an empty Type here quickly crashes.

Fixes <rdar://problem/32296747>, <https://bugs.swift.org/browse/SR-4945>.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit f2873ea into swiftlang:master Jul 20, 2017
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