@@ -44,7 +44,7 @@ public func genericPropertyOnAnyObject(o: AnyObject, b: Bool) -> AnyObject?? {
44
44
// CHECK: dynamic_method_br %4 : $@opened([[TAG:.*]]) AnyObject, #GenericClass.propertyThing!getter.1.foreign, bb1
45
45
// CHECK: bb1({{%.*}} : $@convention(objc_method) @pseudogeneric (@opened([[TAG]]) AnyObject) -> @autoreleased Optional<AnyObject>):
46
46
47
- protocol ThingHolder {
47
+ public protocol ThingHolder {
48
48
associatedtype Thing
49
49
50
50
init !( thing: Thing ! )
@@ -65,16 +65,20 @@ protocol ThingHolder {
65
65
extension GenericClass : ThingHolder { }
66
66
#endif
67
67
68
- public func genericBlockBridging< T: AnyObject > ( x: GenericClass < T > ) {
68
+ public protocol Ansible : class {
69
+ associatedtype Anser : ThingHolder
70
+ }
71
+
72
+ public func genericBlockBridging< T: Ansible > ( x: GenericClass < T > ) {
69
73
let block = x. blockForPerformingOnThings ( )
70
74
x. performBlock ( onThings: block)
71
75
}
72
76
73
77
// CHECK-LABEL: sil @_TF21objc_imported_generic20genericBlockBridging
74
- // CHECK: [[BLOCK_TO_FUNC:%.*]] = function_ref @_TTRGRxs9AnyObjectrXFdCb_dx_ax_XFo_ox_ox_
75
- // CHECK: partial_apply [[BLOCK_TO_FUNC]]<T>
76
- // CHECK: [[FUNC_TO_BLOCK:%.*]] = function_ref @_TTRGRxs9AnyObjectrXFo_ox_ox_XFdCb_dx_ax_
77
- // CHECK: init_block_storage_header {{.*}} invoke [[FUNC_TO_BLOCK]]<T>
78
+ // CHECK: [[BLOCK_TO_FUNC:%.*]] = function_ref @_TTRGRxs9AnyObjectx21objc_imported_generic7AnsiblerXFdCb_dx_ax_XFo_ox_ox_
79
+ // CHECK: partial_apply [[BLOCK_TO_FUNC]]<T, {{.*}} >
80
+ // CHECK: [[FUNC_TO_BLOCK:%.*]] = function_ref @_TTRGRxs9AnyObjectx21objc_imported_generic7AnsiblerXFo_ox_ox_XFdCb_dx_ax_
81
+ // CHECK: init_block_storage_header {{.*}} invoke [[FUNC_TO_BLOCK]]<T,{{.*}} >
78
82
79
83
// CHECK-LABEL: sil @_TF21objc_imported_generic20arraysOfGenericParam
80
84
public func arraysOfGenericParam< T: AnyObject > ( y: Array < T > ) {
0 commit comments