Skip to content

Commit d47d866

Browse files
committed
ConformanceLookup: filter ReferenceStorageTypes
The remaining place where this appears to come up is while building a substitution map, so just filter the SIL type wrappers off just before doing lookup in the module, instead of during every lookup.
1 parent 2f433f6 commit d47d866

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/AST/TypeSubstitution.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ operator()(CanType dependentType, Type conformingReplacementType,
211211
if (conformingReplacementType->isTypeParameter())
212212
return ProtocolConformanceRef(conformedProtocol);
213213

214+
// Look through SIL-specific type wrappings.
215+
conformingReplacementType =
216+
conformingReplacementType->getReferenceStorageReferent();
217+
214218
assert(M && "null module in conformance lookup");
215219
return M->lookupConformance(conformingReplacementType,
216220
conformedProtocol,

0 commit comments

Comments
 (0)