mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #86020 from slavapestov/opaque-archetype-sugar-type-variable
AST: Canonicalize opaque archetype substitution maps in the solver arena
This commit is contained in:
@@ -6086,6 +6086,11 @@ GenericEnvironment *GenericEnvironment::forPrimary(GenericSignature signature) {
|
||||
/// outer substitutions.
|
||||
GenericEnvironment *GenericEnvironment::forOpaqueType(
|
||||
OpaqueTypeDecl *opaque, SubstitutionMap subs) {
|
||||
// Don't preserve sugar if we have type variables, because this leads to
|
||||
// excessive solver arena memory usage.
|
||||
if (subs.getRecursiveProperties().hasTypeVariable())
|
||||
subs = subs.getCanonical();
|
||||
|
||||
auto &ctx = opaque->getASTContext();
|
||||
|
||||
auto properties = ArchetypeType::archetypeProperties(
|
||||
|
||||
Reference in New Issue
Block a user