Handle explicit lifetime dependence specifiers in initializers

This commit is contained in:
Meghana Gupta
2024-02-01 10:25:34 -08:00
parent a6dbfa9c53
commit c8ece100ba
19 changed files with 191 additions and 50 deletions

View File

@@ -330,7 +330,8 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
/*Throws=*/false, /*ThrowsLoc=*/SourceLoc(),
/*ThrownType=*/TypeLoc(),
paramList, /*GenericParams=*/nullptr, decl);
paramList, /*GenericParams=*/nullptr, decl,
/*LifetimeDependentReturnTypeRepr*/ nullptr);
// Mark implicit.
ctor->setImplicit();
@@ -830,7 +831,8 @@ createDesignatedInitOverride(ClassDecl *classDecl,
/*Throws=*/superclassCtor->hasThrows(),
/*ThrowsLoc=*/SourceLoc(),
TypeLoc::withoutLoc(thrownType),
bodyParams, genericParams, implCtx);
bodyParams, genericParams, implCtx,
/*LifetimeDependentReturnTypeRepr*/ nullptr);
ctor->setImplicit();