mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
RequirementMachine: Tighten up createRequirementFromRule()
Now that the 'identity conformance' [P].[P] => [P] is permanent, we won't see it here, so we can just assume that any non-permanent, non-redundant rule maps to a requirement.
This commit is contained in:
@@ -154,12 +154,13 @@ RequirementMachine::buildRequirementSignature(ArrayRef<unsigned> rules,
|
||||
}
|
||||
|
||||
llvm_unreachable("Invalid symbol kind");
|
||||
} else if (rule.getLHS().back().getKind() != Symbol::Kind::Protocol) {
|
||||
auto constraintType = Context.getTypeForTerm(rule.getLHS(), genericParams);
|
||||
auto subjectType = Context.getTypeForTerm(rule.getRHS(), genericParams);
|
||||
|
||||
sameTypeReqs[subjectType.getPointer()].Members.push_back(constraintType);
|
||||
}
|
||||
|
||||
assert(rule.getLHS().back().getKind() != Symbol::Kind::Protocol);
|
||||
auto constraintType = Context.getTypeForTerm(rule.getLHS(), genericParams);
|
||||
auto subjectType = Context.getTypeForTerm(rule.getRHS(), genericParams);
|
||||
|
||||
sameTypeReqs[subjectType.getPointer()].Members.push_back(constraintType);
|
||||
};
|
||||
|
||||
if (getDebugOptions().contains(DebugFlags::Minimization)) {
|
||||
|
||||
Reference in New Issue
Block a user