[AST] Assume that placeholder types conform to all protocols

This commit is contained in:
Frederick Kellison-Linn
2020-10-24 19:03:11 -04:00
committed by Freddy Kellison-Linn
parent a79e7b59f0
commit a5d0153fbf

View File

@@ -1023,8 +1023,8 @@ LookupConformanceInModuleRequest::evaluate(
// UnresolvedType is a placeholder for an unknown type used when generating
// diagnostics. We consider it to conform to all protocols, since the
// intended type might have.
if (type->is<UnresolvedType>())
// intended type might have. Same goes for PlaceholderType.
if (type->is<UnresolvedType>() || type->is<PlaceholderType>())
return ProtocolConformanceRef(protocol);
auto nominal = type->getAnyNominal();