You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CHECK-LABEL: sil @$concrete_int_closure : $@convention(thin) <T where T : Q> (@in_guaranteed T.S) -> @owned @callee_guaranteed () -> Int {
110
+
// CHECK: [[FN:%.*]] = witness_method $T.S, #Curryable.concreteRequirementInt : <Self where Self : Curryable> (Self) -> () -> Int : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable> (@in_guaranteed τ_0_0) -> Int
111
+
// CHECK: partial_apply [callee_guaranteed] [[FN]]<T.S>(%0) : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable> (@in_guaranteed τ_0_0) -> Int
112
+
// CHECK: return
113
+
sil @$concrete_int_closure : $@convention(thin) <T where T : Q> (@in_guaranteed T.S) -> @owned @callee_guaranteed () -> Int {
114
+
bb0(%0 : $*T.S):
115
+
%fn = function_ref @$concrete_int_closure_inner : $@convention(thin) <τ_0_0 where τ_0_0 : Q> (@in_guaranteed τ_0_0.S) -> Int
116
+
%closure = partial_apply [callee_guaranteed] %fn<T>(%0) : $@convention(thin) <τ_0_0 where τ_0_0 : Q> (@in_guaranteed τ_0_0.S) -> Int
117
+
return %closure : $@callee_guaranteed () -> Int
118
+
}
119
+
120
+
sil private @$concrete_int_closure_inner : $@convention(thin) <T where T : Q> (@in_guaranteed T.S) -> Int {
121
+
bb0(%0 : $*T.S):
122
+
%fn = witness_method $T.S, #Curryable.concreteRequirementInt : <Self where Self : Curryable> (Self) -> () -> Int : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable> (@in_guaranteed τ_0_0) -> Int
123
+
%result = apply %fn<T.S>(%0) : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable> (@in_guaranteed τ_0_0) -> Int
124
+
return %result : $Int
125
+
}
126
+
127
+
// CHECK-LABEL: sil @$generic_int_closure : $@convention(thin) <T where T : Q> (@in_guaranteed T.S) -> @owned @callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> Int for <T.U> {
128
+
// CHECK: [[FN:%.*]] = witness_method $T.S, #Curryable.genericRequirementInt : <Self where Self : Curryable><T where T : P> (Self) -> (T) -> Int : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable><τ_1_0 where τ_1_0 : P> (@in_guaranteed τ_1_0, @in_guaranteed τ_0_0) -> Int
129
+
// CHECK: partial_apply [callee_guaranteed] [[FN]]<T.S, T.U>(%0) : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable><τ_1_0 where τ_1_0 : P> (@in_guaranteed τ_1_0, @in_guaranteed τ_0_0) -> Int
130
+
// CHECK: return
131
+
sil @$generic_int_closure : $@convention(thin) <T where T : Q> (@in_guaranteed T.S) -> @owned @callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> Int for <T.U> {
132
+
bb0(%0 : $*T.S):
133
+
%fn = function_ref @$generic_int_closure_inner : $@convention(thin) <τ_0_0 where τ_0_0 : Q> (@in_guaranteed τ_0_0.U, @in_guaranteed τ_0_0.S) -> Int
134
+
%closure = partial_apply [callee_guaranteed] %fn<T>(%0) : $@convention(thin) <τ_0_0 where τ_0_0 : Q> (@in_guaranteed τ_0_0.U, @in_guaranteed τ_0_0.S) -> Int
135
+
%converted = convert_function %closure : $@callee_guaranteed (@in_guaranteed T.U) -> Int to $@callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> Int for <T.U>
136
+
return %converted : $@callee_guaranteed @substituted <τ_0_0> (@in_guaranteed τ_0_0) -> Int for <T.U>
137
+
}
138
+
139
+
sil private @$generic_int_closure_inner : $@convention(thin) <T where T : Q> (@in_guaranteed T.U, @in_guaranteed T.S) -> Int {
140
+
bb0(%0 : $*T.U, %1 : $*T.S):
141
+
%fn = witness_method $T.S, #Curryable.genericRequirementInt : <Self where Self : Curryable><T where T : P> (Self) -> (T) -> Int : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable><τ_1_0 where τ_1_0 : P> (@in_guaranteed τ_1_0, @in_guaranteed τ_0_0) -> Int
142
+
%result = apply %fn<T.S, T.U>(%0, %1) : $@convention(witness_method: Curryable) <τ_0_0 where τ_0_0 : Curryable><τ_1_0 where τ_1_0 : P> (@in_guaranteed τ_1_0, @in_guaranteed τ_0_0) -> Int
143
+
return %result : $Int
144
+
}
145
+
146
+
// CHECK-LABEL: sil @$concrete_closure_throws : $@convention(thin) <T where T : Q> (@in_guaranteed T.S) -> @owned @callee_guaranteed () -> @error Error {
0 commit comments