5
5
6
6
import resilient_class
7
7
8
+ func doFoo( f: ( ) -> ( ) ) {
9
+ f ( )
10
+ }
11
+
8
12
public class Parent {
9
13
public init ( ) { }
10
14
public func method( ) { }
@@ -26,7 +30,7 @@ public class GenericParent<A> {
26
30
27
31
class Child : Parent {
28
32
// CHECK-LABEL: sil hidden @_TFC19partial_apply_super5Child6methodfT_T_ : $@convention(method) (@guaranteed Child) -> ()
29
- // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF15resilient_class5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
33
+ // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF19partial_apply_super5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
30
34
// CHECK: [[CASTED_SELF:%[0-9]+]] = upcast %0 : $Child to $Parent
31
35
// CHECK: [[SUPER_METHOD:%[0-9]+]] = super_method %0 : $Child, #Parent.method!1 : (Parent) -> () -> () , $@convention(method) (@guaranteed Parent) -> ()
32
36
// CHECK: [[PARTIAL_APPLY:%[0-9]+]] = partial_apply [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(method) (@guaranteed Parent) -> ()
@@ -36,7 +40,7 @@ class Child : Parent {
36
40
}
37
41
38
42
// CHECK-LABEL: sil hidden @_TZFC19partial_apply_super5Child11classMethodfT_T_ : $@convention(thin) (@thick Child.Type) -> () {
39
- // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF15resilient_class5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
43
+ // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF19partial_apply_super5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
40
44
// CHECK: [[CASTED_SELF:%[0-9]+]] = upcast %0 : $@thick Child.Type to $@thick Parent.Type
41
45
// CHECK: [[SUPER_METHOD:%[0-9]+]] = super_method %0 : $@thick Child.Type, #Parent.classMethod!1 : (Parent.Type) -> () -> () , $@convention(thin) (@thick Parent.Type) -> ()
42
46
// CHECK: [[PARTIAL_APPLY:%[0-9]+]] = partial_apply [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(thin) (@thick Parent.Type) -> ()
@@ -46,7 +50,7 @@ class Child : Parent {
46
50
}
47
51
48
52
// CHECK-LABEL: sil hidden @_TFC19partial_apply_super5Child20callFinalSuperMethodfT_T_ : $@convention(method) (@guaranteed Child) -> ()
49
- // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF15resilient_class5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
53
+ // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF19partial_apply_super5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
50
54
// CHECK: [[CASTED_SELF:%[0-9]+]] = upcast %0 : $Child to $Parent
51
55
// CHECK: [[SUPER_METHOD:%[0-9]+]] = function_ref @_TFC19partial_apply_super6Parent11finalMethodFT_T_ : $@convention(thin) (@owned Parent) -> @owned @callee_owned () -> ()
52
56
// CHECK: [[APPLIED_SELF:%[0-9]+]] = apply [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(thin) (@owned Parent) -> @owned @callee_owned () -> ()
@@ -56,7 +60,7 @@ class Child : Parent {
56
60
}
57
61
58
62
// CHECK-LABEL: sil hidden @_TZFC19partial_apply_super5Child25callFinalSuperClassMethodfT_T_ : $@convention(thin) (@thick Child.Type) -> ()
59
- // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF15resilient_class5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
63
+ // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF19partial_apply_super5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
60
64
// CHECK: [[CASTED_SELF:%[0-9]+]] = upcast %0 : $@thick Child.Type to $@thick Parent.Type
61
65
// CHECK: [[SUPER_METHOD:%[0-9]+]] = function_ref @_TZFC19partial_apply_super6Parent16finalClassMethodFT_T_ : $@convention(thin) (@thick Parent.Type) -> @owned @callee_owned () -> ()
62
66
// CHECK: [[APPLIED_SELF:%[0-9]+]] = apply [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(thin) (@thick Parent.Type) -> @owned @callee_owned () -> ()
@@ -71,7 +75,7 @@ class GenericChild<A> : GenericParent<A> {
71
75
super. init ( a: a)
72
76
}
73
77
// CHECK-LABEL: sil hidden @_TFC19partial_apply_super12GenericChild6methodfT_T_ : $@convention(method) <A> (@guaranteed GenericChild<A>) -> ()
74
- // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF15resilient_class5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
78
+ // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF19partial_apply_super5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
75
79
// CHECK: [[CASTED_SELF:%[0-9]+]] = upcast %0 : $GenericChild<A> to $GenericParent<A>
76
80
// CHECK: [[SUPER_METHOD:%[0-9]+]] = super_method %0 : $GenericChild<A>, #GenericParent.method!1 : <A> (GenericParent<A>) -> () -> () , $@convention(method) <τ_0_0> (@guaranteed GenericParent<τ_0_0>) -> ()
77
81
// CHECK: [[PARTIAL_APPLY:%[0-9]+]] = partial_apply [[SUPER_METHOD]]<A>([[CASTED_SELF]]) : $@convention(method) <τ_0_0> (@guaranteed GenericParent<τ_0_0>) -> ()
@@ -81,7 +85,7 @@ class GenericChild<A> : GenericParent<A> {
81
85
}
82
86
83
87
// CHECK-LABEL: sil hidden @_TZFC19partial_apply_super12GenericChild11classMethodfT_T_ : $@convention(thin) <A> (@thick GenericChild<A>.Type) -> ()
84
- // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF15resilient_class5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
88
+ // CHECK: [[DOFOO:%[0-9]+]] = function_ref @_TF19partial_apply_super5doFooFFT_T_T_ : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
85
89
// CHECK: [[CASTED_SELF:%[0-9]+]] = upcast %0 : $@thick GenericChild<A>.Type to $@thick GenericParent<A>.Type
86
90
// CHECK: [[SUPER_METHOD:%[0-9]+]] = super_method %0 : $@thick GenericChild<A>.Type, #GenericParent.classMethod!1 : <A> (GenericParent<A>.Type) -> () -> () , $@convention(thin) <τ_0_0> (@thick GenericParent<τ_0_0>.Type) -> ()
87
91
// CHECK: [[PARTIAL_APPLY:%[0-9]+]] = partial_apply %4<A>(%3) : $@convention(thin) <τ_0_0> (@thick GenericParent<τ_0_0>.Type) -> ()
0 commit comments