allow type initializers to be 'async'

implicit calls to an async super.init are not allowed
This commit is contained in:
Kavon Farvardin
2021-01-12 17:24:06 -08:00
parent 7089bf603d
commit 4f6eb85fe3
19 changed files with 74 additions and 38 deletions

View File

@@ -141,9 +141,11 @@ static ConcreteDeclRef generateDeclRefForSpecializedCXXFunctionTemplate(
if (isa<ConstructorDecl>(oldDecl)) {
DeclName ctorName(ctx, DeclBaseName::createConstructor(), newParamList);
auto newCtorDecl = ConstructorDecl::createImported(
ctx, specialized, ctorName, oldDecl->getLoc(), /*failable=*/false,
/*failabilityLoc=*/SourceLoc(), /*throws=*/false,
/*throwsLoc=*/SourceLoc(), newParamList, /*genericParams=*/nullptr,
ctx, specialized, ctorName, oldDecl->getLoc(),
/*failable=*/false, /*failabilityLoc=*/SourceLoc(),
/*Async=*/false, /*AsyncLoc=*/SourceLoc(),
/*throws=*/false, /*throwsLoc=*/SourceLoc(),
newParamList, /*genericParams=*/nullptr,
oldDecl->getDeclContext());
return ConcreteDeclRef(newCtorDecl);
}