Skip to content

Commit 0e75312

Browse files
committed
[AST] Handle pack element types in LookupConformanceInModuleRequest
1 parent 72486c9 commit 0e75312

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/AST/ConformanceLookup.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,11 @@ LookupConformanceInModuleRequest::evaluate(
477477
if (auto selfType = type->getAs<DynamicSelfType>())
478478
type = selfType->getSelfType();
479479

480+
// A pack element type conforms to whatever its underlying pack type
481+
// conforms to.
482+
if (auto packElement = type->getAs<PackElementType>())
483+
type = packElement->getPackType();
484+
480485
// An archetype conforms to a protocol if the protocol is listed in the
481486
// archetype's list of conformances, or if the archetype has a superclass
482487
// constraint and the superclass conforms to the protocol.

0 commit comments

Comments
 (0)