We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d994b27 + 4201ed3 commit 8b386d2Copy full SHA for 8b386d2
lib/AST/ASTContext.cpp
@@ -6086,6 +6086,11 @@ GenericEnvironment *GenericEnvironment::forPrimary(GenericSignature signature) {
6086
/// outer substitutions.
6087
GenericEnvironment *GenericEnvironment::forOpaqueType(
6088
OpaqueTypeDecl *opaque, SubstitutionMap subs) {
6089
+ // Don't preserve sugar if we have type variables, because this leads to
6090
+ // excessive solver arena memory usage.
6091
+ if (subs.getRecursiveProperties().hasTypeVariable())
6092
+ subs = subs.getCanonical();
6093
+
6094
auto &ctx = opaque->getASTContext();
6095
6096
auto properties = ArchetypeType::archetypeProperties(
0 commit comments