File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -754,10 +754,14 @@ void RewriteSystem::verifyRewriteRules(ValidityPolicy policy) const {
754754 for (unsigned index : indices (rhs)) {
755755 auto symbol = rhs[index];
756756
757- // Permanent rules contain name symbols at the end, like
758- // [P].T => [P:T].
759- if (!rule.isRHSSimplified () &&
760- (!rule.isPermanent () || index == rhs.size () - 1 )) {
757+ // RHS-simplified rules might have unresolved name symbols on the
758+ // right hand side. Also, completion can introduce rules of the
759+ // form T.X.[concrete: C] => T.X, where T is some resolved term,
760+ // and X is a name symbol for a protocol typealias.
761+ if (!rule.isLHSSimplified () &&
762+ !rule.isRHSSimplified () &&
763+ !(rule.isPropertyRule () &&
764+ index == rhs.size () - 1 )) {
761765 // This is only true if the input requirements were valid.
762766 if (policy == DisallowInvalidRequirements) {
763767 ASSERT_RULE (symbol.getKind () != Symbol::Kind::Name);
You can’t perform that action at this time.
0 commit comments