Skip to content

Commit 860c869

Browse files
committed
[AST][AutoDiff] Skip implicit GenericTypeParamDecl AST verification.
1 parent 319b3e6 commit 860c869

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/AST/ASTVerifier.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,6 +2844,13 @@ class Verifier : public ASTWalker {
28442844
abort();
28452845
}
28462846

2847+
// [AST][AutoDiff] Skip implicit GenericTypeParamDecl AST verification. #32343
2848+
// re-applied from https://github.com/apple/swift/pull/32343
2849+
// Skip implicit generic param decls. Their depth and index may not be
2850+
// consistent with the generic context's parameter list.
2851+
if (GTPD->isImplicit())
2852+
return;
2853+
28472854
unsigned currentDepth = DC->getGenericContextDepth();
28482855
if (currentDepth < GTPD->getDepth()) {
28492856
Out << "GenericTypeParamDecl has incorrect depth\n";

0 commit comments

Comments
 (0)