We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 54144ac + 97c5e24 commit 4a9ab66Copy full SHA for 4a9ab66
lib/SILGen/SILGenFunction.cpp
@@ -517,7 +517,14 @@ void SILGenFunction::emitFunction(FuncDecl *fd) {
517
fd->getResultInterfaceType(), fd->hasThrows(), fd->getThrowsLoc());
518
prepareEpilog(true, fd->hasThrows(), CleanupLocation(fd));
519
520
- emitStmt(fd->getTypecheckedBody());
+ if (fd->isAsyncHandler()) {
521
+ // Async handlers are need to have their bodies emitted into a
522
+ // detached task.
523
+ // FIXME: Actually implement these properly.
524
+ B.createBuiltinTrap(fd->getTypecheckedBody());
525
+ } else {
526
+ emitStmt(fd->getTypecheckedBody());
527
+ }
528
529
emitEpilog(fd);
530
0 commit comments