Skip to content

Commit 6475efc

Browse files
committed
AST: lookupConformance() returns an abstract conformance given a type parameter
1 parent eea7ab3 commit 6475efc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/AST/ConformanceLookup.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,10 @@ LookupConformanceInModuleRequest::evaluate(
519519
return result;
520520
}
521521

522+
// Type parameters have trivial conformances.
523+
if (type->isTypeParameter())
524+
return ProtocolConformanceRef(protocol);
525+
522526
// Type variables have trivial conformances.
523527
if (type->isTypeVariableOrMember())
524528
return ProtocolConformanceRef(protocol);

0 commit comments

Comments
 (0)