@@ -3805,14 +3805,9 @@ PotentialArchetype *GenericSignatureBuilder::realizePotentialArchetype(
3805
3805
return pa;
3806
3806
}
3807
3807
3808
- static Type getStructuralType (TypeDecl *typeDecl, LazyResolver *resolver) {
3809
- if (auto typealias = dyn_cast<TypeAliasDecl>(typeDecl)) {
3810
- // Resolve the underlying type, if we haven't done so yet.
3811
- if (!typealias->hasInterfaceType ())
3812
- resolver->resolveDeclSignature (typealias);
3813
-
3814
- return typealias->getUnderlyingTypeLoc ().getType ();
3815
- }
3808
+ static Type getStructuralType (TypeDecl *typeDecl) {
3809
+ if (auto typealias = dyn_cast<TypeAliasDecl>(typeDecl))
3810
+ return typealias->getStructuralType ();
3816
3811
3817
3812
return typeDecl->getDeclaredInterfaceType ();
3818
3813
}
@@ -3826,7 +3821,7 @@ static Type substituteConcreteType(GenericSignatureBuilder &builder,
3826
3821
3827
3822
// Form an unsubstituted type referring to the given type declaration,
3828
3823
// for use in an inferred same-type requirement.
3829
- auto type = getStructuralType (concreteDecl, builder. getLazyResolver () );
3824
+ auto type = getStructuralType (concreteDecl);
3830
3825
if (!type)
3831
3826
return Type ();
3832
3827
@@ -4228,10 +4223,10 @@ ConstraintResult GenericSignatureBuilder::expandConformanceRequirement(
4228
4223
// An inferred same-type requirement between the two type declarations
4229
4224
// within this protocol or a protocol it inherits.
4230
4225
auto addInferredSameTypeReq = [&](TypeDecl *first, TypeDecl *second) {
4231
- Type firstType = getStructuralType (first, getLazyResolver () );
4226
+ Type firstType = getStructuralType (first);
4232
4227
if (!firstType) return ;
4233
4228
4234
- Type secondType = getStructuralType (second, getLazyResolver () );
4229
+ Type secondType = getStructuralType (second);
4235
4230
if (!secondType) return ;
4236
4231
4237
4232
auto inferredSameTypeSource =
0 commit comments