Skip to content

Commit e6eb5da

Browse files
hborlasimanerush
authored andcommitted
[Requirement Machine] Stricter verification conditions for element symbols.
1 parent e19aadc commit e6eb5da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/AST/RequirementMachine/RewriteSystem.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ void RewriteSystem::verifyRewriteRules(ValidityPolicy policy) const {
556556

557557
if (index != 0) {
558558
ASSERT_RULE(symbol.getKind() != Symbol::Kind::GenericParam ||
559-
lhs[index - 1].getKind() == Symbol::Kind::PackElement);
559+
(index == 1 &&
560+
lhs[index - 1].getKind() == Symbol::Kind::PackElement));
560561
}
561562

562563
if (!rule.isLHSSimplified() &&
@@ -612,7 +613,8 @@ void RewriteSystem::verifyRewriteRules(ValidityPolicy policy) const {
612613

613614
if (index != 0) {
614615
ASSERT_RULE(symbol.getKind() != Symbol::Kind::GenericParam ||
615-
lhs[index - 1].getKind() == Symbol::Kind::PackElement);
616+
(index == 1 &&
617+
lhs[index - 1].getKind() == Symbol::Kind::PackElement));
616618
}
617619

618620
if (!rule.isRHSSimplified() &&

0 commit comments

Comments
 (0)