Skip to content

Commit 07beb21

Browse files
committed
Change some builtins to conform their result to Escapable
1 parent 11d5179 commit 07beb21

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/AST/Builtins.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,10 @@ static ValueDecl *getWithUnsafeContinuation(ASTContext &ctx,
20732073
auto *fnTy = FunctionType::get(params, voidTy, extInfo);
20742074

20752075
builder.addParameter(makeConcrete(fnTy));
2076-
builder.setResult(makeGenericParam());
2076+
2077+
auto resultTy = makeGenericParam();
2078+
builder.addConformanceRequirement(resultTy, KnownProtocolKind::Escapable);
2079+
builder.setResult(resultTy);
20772080

20782081
builder.setAsync();
20792082
if (throws)

0 commit comments

Comments
 (0)