Skip to content

Commit d14bd85

Browse files
committed
Eliminate an indirect use of OpaqueTypeArchetypeType in the constraint solver
1 parent d49a20e commit d14bd85

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/AST/Type.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,8 +3124,12 @@ static bool matches(CanType t1, CanType t2, TypeMatchOptions matchMode,
31243124
if (matchMode.contains(TypeMatchFlags::AllowCompatibleOpaqueTypeArchetypes))
31253125
if (auto opaque1 = t1->getAs<OpaqueTypeArchetypeType>())
31263126
if (auto opaque2 = t2->getAs<OpaqueTypeArchetypeType>())
3127-
return opaque1->getBoundSignature().getCanonicalSignature() ==
3128-
opaque2->getBoundSignature().getCanonicalSignature() &&
3127+
return opaque1->getDecl()->getOpaqueInterfaceGenericSignature()
3128+
.getCanonicalSignature() ==
3129+
opaque2->getDecl()->getOpaqueInterfaceGenericSignature()
3130+
.getCanonicalSignature() &&
3131+
opaque1->getSubstitutions().getCanonical() ==
3132+
opaque2->getSubstitutions().getCanonical() &&
31293133
opaque1->getInterfaceType()->getCanonicalType()->matches(
31303134
opaque2->getInterfaceType()->getCanonicalType(), matchMode);
31313135

0 commit comments

Comments
 (0)