Type check withoutActuallyEscaping on async functions

Fixes rdar://73695354.
This commit is contained in:
Doug Gregor
2021-01-29 16:22:43 -08:00
parent 3b77ce4e19
commit b7a86bb3bc
2 changed files with 11 additions and 0 deletions

View File

@@ -1900,6 +1900,7 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
auto bodyClosure = FunctionType::get(arg, result,
FunctionType::ExtInfoBuilder()
.withNoEscape(true)
.withAsync(true)
.withThrows(true)
.build());
FunctionType::Param args[] = {
@@ -1910,6 +1911,7 @@ static std::pair<Type, Type> getTypeOfReferenceWithSpecialTypeCheckingSemantics(
auto refType = FunctionType::get(args, result,
FunctionType::ExtInfoBuilder()
.withNoEscape(false)
.withAsync(true)
.withThrows(true)
.build());
return {refType, refType};