Skip to content

Commit 897fc89

Browse files
committed
[Requirement Machine] Stricter verification conditions for element symbols.
1 parent db7586e commit 897fc89

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
@@ -570,7 +570,8 @@ void RewriteSystem::verifyRewriteRules(ValidityPolicy policy) const {
570570

571571
if (index != 0) {
572572
ASSERT_RULE(symbol.getKind() != Symbol::Kind::GenericParam ||
573-
lhs[index - 1].getKind() == Symbol::Kind::PackElement);
573+
(index == 1 &&
574+
lhs[index - 1].getKind() == Symbol::Kind::PackElement));
574575
}
575576

576577
if (!rule.isLHSSimplified() &&
@@ -626,7 +627,8 @@ void RewriteSystem::verifyRewriteRules(ValidityPolicy policy) const {
626627

627628
if (index != 0) {
628629
ASSERT_RULE(symbol.getKind() != Symbol::Kind::GenericParam ||
629-
lhs[index - 1].getKind() == Symbol::Kind::PackElement);
630+
(index == 1 &&
631+
lhs[index - 1].getKind() == Symbol::Kind::PackElement));
630632
}
631633

632634
if (!rule.isRHSSimplified() &&

0 commit comments

Comments
 (0)