Skip to content

Commit 0e3ec87

Browse files
committed
[Test] Tested @callee_guaranteed witness_method.
Previously, the test verified the behavior the partial application of of dynamic async @convention(witness_method) functions which produced @callee_owned thick functions. That callee convention is no longer used, so here that test is changed to verify the behavior of producing @callee_guaranteed thick functions which are in fact still used.
1 parent eacd063 commit 0e3ec87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/IRGen/async/run-partialapply-capture-generic_conformer-and-generic-to-void.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ sil @test_case : $@convention(thin) @async () -> () {
6969
strong_retain %observableImpl : $ObservableImpl
7070
%observableImpl_addr = alloc_stack $ObservableImpl
7171
store %observableImpl to %observableImpl_addr : $*ObservableImpl
72-
%witness_method = function_ref @witness_method : $@async @convention(thin) <S where S : Observable><O where O : Observer, S.Result == O.Result> (@in S) -> @owned @async @callee_owned (@in O) -> ()
73-
%partiallyApplied = apply %witness_method<ObservableImpl, ObserverImpl>(%observableImpl_addr) : $@async @convention(thin) <S where S : Observable><O where O : Observer, S.Result == O.Result> (@in S) -> @owned @async @callee_owned (@in O) -> ()
72+
%witness_method = function_ref @witness_method : $@async @convention(thin) <S where S : Observable><O where O : Observer, S.Result == O.Result> (@in S) -> @owned @async @callee_guaranteed (@in O) -> ()
73+
%partiallyApplied = apply %witness_method<ObservableImpl, ObserverImpl>(%observableImpl_addr) : $@async @convention(thin) <S where S : Observable><O where O : Observer, S.Result == O.Result> (@in S) -> @owned @async @callee_guaranteed (@in O) -> ()
7474
%observerImpl = alloc_ref $ObserverImpl
7575
%observerImpl_addr = alloc_stack $ObserverImpl
7676
store %observerImpl to %observerImpl_addr : $*ObserverImpl
7777

78-
%result = apply %partiallyApplied(%observerImpl_addr) : $@async @callee_owned (@in ObserverImpl) -> ()
78+
%result = apply %partiallyApplied(%observerImpl_addr) : $@async @callee_guaranteed (@in ObserverImpl) -> ()
7979

8080
dealloc_stack %observerImpl_addr : $*ObserverImpl
8181
dealloc_stack %observableImpl_addr : $*ObservableImpl

0 commit comments

Comments
 (0)