AST: Fix ProtocolDecl::getInheritedProtocols() for protocols that inherit from compositions [4.0] #10354
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description: Fix a name lookup bug in a multi-file scenario where a protocol defined in another source file inherits from a typealias containing a protocol composition. Manifests as an assertion failure in Sema when asserts are on, and a SILGen crash when asserts are off.
Origination: Recent regression introduced by the associated type where clause work.
Risk: Low, the modified code should behave identically except when a protocol composition type appears in the inheritance clause.
Tested: Added a reduced test case from a user project that encountered the bug.
Reviewed by: @DougGregor
Radar: rdar://problem/32595988