Skip to content

Commit 29f9c75

Browse files
authored
Merge pull request #83001 from DougGregor/recursion-check-before-invalid
[Associated type inference] Do recursive validation check before "invalid" check
2 parents 1456867 + 72bda97 commit 29f9c75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/AssociatedTypeInference.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,13 +2126,13 @@ AssociatedTypeInference::inferTypeWitnessesViaAssociatedType(
21262126
!witnessHasImplementsAttrForRequiredName(typeDecl, assocType))
21272127
continue;
21282128

2129-
if (typeDecl->isInvalid()) {
2129+
if (typeDecl->isRecursiveValidation()) {
21302130
LLVM_DEBUG(llvm::dbgs() << "Recursive validation\n";);
21312131
continue;
21322132
}
21332133

2134-
if (typeDecl->isRecursiveValidation()) {
2135-
LLVM_DEBUG(llvm::dbgs() << "Recursive validation\n";);
2134+
if (typeDecl->isInvalid()) {
2135+
LLVM_DEBUG(llvm::dbgs() << "Invalid type witness\n";);
21362136
continue;
21372137
}
21382138

0 commit comments

Comments
 (0)