Skip to content

Commit 89382f7

Browse files
authored
[ParseSIL] Fix parsing type constraint requirements. (#24790)
Use `RequirementRepr::getSubjectLoc` and `RequirementRepr::getConstraintLoc` on type constraint requirements.
1 parent cb6d47e commit 89382f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/ParseSIL/ParseSIL.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,10 +951,10 @@ void SILParser::convertRequirements(SILFunction *F,
951951
}
952952

953953
if (Req.getKind() == RequirementReprKind::TypeConstraint) {
954-
auto FirstType = ResolveToInterfaceType(Req.getFirstTypeLoc());
955-
auto SecondType = ResolveToInterfaceType(Req.getSecondTypeLoc());
956-
Requirement ConvertedRequirement(RequirementKind::Conformance, FirstType,
957-
SecondType);
954+
auto Subject = ResolveToInterfaceType(Req.getSubjectLoc());
955+
auto Constraint = ResolveToInterfaceType(Req.getConstraintLoc());
956+
Requirement ConvertedRequirement(RequirementKind::Conformance, Subject,
957+
Constraint);
958958
To.push_back(ConvertedRequirement);
959959
continue;
960960
}

0 commit comments

Comments
 (0)