@@ -276,6 +276,39 @@ extension MyActor : @preconcurrency Q {
276276// CHECK: [[CHECK_EXEC_REF:%.*]] = function_ref @$ss22_checkExpectedExecutor14_filenameStart01_D6Length01_D7IsASCII5_line9_executoryBp_BwBi1_BwBetF
277277// CHECK-NEXT: {{.*}} = apply [[CHECK_EXEC_REF]]({{.*}}, [[EXEC]])
278278
279+ // https://github.com/apple/swift/issues/74294
280+ protocol Parent {
281+ func a( )
282+ }
283+
284+ protocol Child : Parent {
285+ func b( )
286+ }
287+
288+ @MainActor
289+ struct PreconcurrencyAppliesToParentToo : @preconcurrency Child {
290+ func a( ) {
291+ }
292+
293+ func b( ) {
294+ }
295+ }
296+
297+ // protocol witness for Child.b() in conformance PreconcurrencyAppliesToParentToo
298+ // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s27preconcurrency_conformances32PreconcurrencyAppliesToParentTooVAA5ChildA2aDP1byyFTW : $@convention(witness_method: Child) (@in_guaranteed PreconcurrencyAppliesToParentToo) -> ()
299+ // CHECK: [[MAIN_ACTOR:%.*]] = begin_borrow {{.*}} : $MainActor
300+ // CHECK-NEXT: [[EXEC:%.*]] = extract_executor [[MAIN_ACTOR]] : $MainActor
301+ // CHECK: [[CHECK_EXEC_REF:%.*]] = function_ref @$ss22_checkExpectedExecutor14_filenameStart01_D6Length01_D7IsASCII5_line9_executoryBp_BwBi1_BwBetF
302+ // CHECK-NEXT: {{.*}} = apply [[CHECK_EXEC_REF]]({{.*}}, [[EXEC]])
303+
304+
305+ // protocol witness for Parent.a() in conformance PreconcurrencyAppliesToParentToo
306+ // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s27preconcurrency_conformances32PreconcurrencyAppliesToParentTooVAA0F0A2aDP1ayyFTW : $@convention(witness_method: Parent) (@in_guaranteed PreconcurrencyAppliesToParentToo) -> ()
307+ // CHECK: [[MAIN_ACTOR:%.*]] = begin_borrow {{.*}} : $MainActor
308+ // CHECK-NEXT: [[EXEC:%.*]] = extract_executor [[MAIN_ACTOR]] : $MainActor
309+ // CHECK: [[CHECK_EXEC_REF:%.*]] = function_ref @$ss22_checkExpectedExecutor14_filenameStart01_D6Length01_D7IsASCII5_line9_executoryBp_BwBi1_BwBetF
310+ // CHECK-NEXT: {{.*}} = apply [[CHECK_EXEC_REF]]({{.*}}, [[EXEC]])
311+
279312//--- checks_disabled.swift
280313protocol P {
281314 associatedtype T
@@ -439,3 +472,29 @@ extension MyActor : @preconcurrency Q {
439472// protocol witness for static Q.data.modify in conformance MyActor
440473// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s27preconcurrency_conformances7MyActorCAA1QA2aDP4dataSaySiGSgvMZTW : $@yield_once @convention(witness_method: Q) @substituted <τ_0_0> (@thick τ_0_0.Type) -> @yields @inout Optional<Array<Int>> for <MyActor>
441474// CHECK-NOT: [[CHECK_EXEC_REF:%.*]] = function_ref @$ss22_checkExpectedExecutor14_filenameStart01_D6Length01_D7IsASCII5_line9_executoryBp_BwBi1_BwBetF
475+
476+ // https://github.com/apple/swift/issues/74294
477+ protocol Parent {
478+ func a( )
479+ }
480+
481+ protocol Child : Parent {
482+ func b( )
483+ }
484+
485+ @MainActor
486+ struct PreconcurrencyAppliesToParentToo : @preconcurrency Child {
487+ func a( ) {
488+ }
489+
490+ func b( ) {
491+ }
492+ }
493+
494+ // protocol witness for Child.b() in conformance PreconcurrencyAppliesToParentToo
495+ // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s27preconcurrency_conformances32PreconcurrencyAppliesToParentTooVAA5ChildA2aDP1byyFTW : $@convention(witness_method: Child) (@in_guaranteed PreconcurrencyAppliesToParentToo) -> ()
496+ // CHECK-NOT: [[CHECK_EXEC_REF:%.*]] = function_ref @$ss22_checkExpectedExecutor14_filenameStart01_D6Length01_D7IsASCII5_line9_executoryBp_BwBi1_BwBetF
497+
498+ // protocol witness for Parent.a() in conformance PreconcurrencyAppliesToParentToo
499+ // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s27preconcurrency_conformances32PreconcurrencyAppliesToParentTooVAA0F0A2aDP1ayyFTW : $@convention(witness_method: Parent) (@in_guaranteed PreconcurrencyAppliesToParentToo) -> ()
500+ // CHECK-NOT: [[CHECK_EXEC_REF:%.*]] = function_ref @$ss22_checkExpectedExecutor14_filenameStart01_D6Length01_D7IsASCII5_line9_executoryBp_BwBi1_BwBetF
0 commit comments