Skip to content

Commit 9453982

Browse files
authored
Merge pull request #35702 from DougGregor/async-handler-lazy-conformances
2 parents 64257e9 + 921cc5f commit 9453982

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

lib/SILGen/SILGenFunction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ void SILGenFunction::emitAsyncHandler(FuncDecl *fd) {
559559
bodyFn->setDebugScope(new (getModule()) SILDebugScope(loc, bodyFn));
560560

561561
SILGenFunction(SGM, *bodyFn, fd).emitFunction(fd);
562-
562+
SGM.emitLazyConformancesForFunction(bodyFn);
563+
563564
// 2. step: emit the original asyncHandler function
564565
//
565566
Scope scope(*this, loc);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-experimental-concurrency > %t.out
2+
// RUN: %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize %s < %t.out
3+
4+
// REQUIRES: objc_interop
5+
// REQUIRES: concurrency
6+
7+
import gizmo
8+
9+
func hashEm<H: Hashable>(_ x: H) {}
10+
11+
public class A {
12+
@asyncHandler
13+
public func f() {
14+
hashEm(NSRuncingOptions.mince)
15+
}
16+
}
17+
18+
// CHECK: sil_witness_table shared [serialized] NSRuncingOptions: Hashable module gizmo

0 commit comments

Comments
 (0)