Skip to content

Commit 7df58a7

Browse files
committed
[Sema] Increase depth and count limits for opaque result type substitutions
Let's set the limits to high end of what we'd expect to prevent regressions. These still require some profiling to fine-tune but the original limits are far too small for SwiftUI views we see in pactice. Resolves: rdar://156896778
1 parent 597aaba commit 7df58a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,11 +614,11 @@ namespace swift {
614614

615615
/// Maximum nesting depth for type substitution operations, to prevent
616616
/// runaway recursion.
617-
unsigned MaxSubstitutionDepth = 50;
617+
unsigned MaxSubstitutionDepth = 1000;
618618

619619
/// Maximum step count for type substitution operations, to prevent
620620
/// runaway recursion.
621-
unsigned MaxSubstitutionCount = 2000;
621+
unsigned MaxSubstitutionCount = 32000;
622622

623623
/// Enable implicit lifetime dependence for ~Escapable return types.
624624
bool EnableExperimentalLifetimeDependenceInference = false;

0 commit comments

Comments
 (0)