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
// expected-error@-1 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to expected argument type '(() -> Void) -> Void'}}
39
+
40
+
let _ :(@convention(block)()->Void)->Void= c.function
41
+
// expected-error@-1 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to specified type '(@convention(block) () -> Void) -> Void'}}
42
+
43
+
let _ :(@convention(c)()->Void)->Void= c.function // OK
44
+
45
+
let _ :(@convention(thin)()->Void)->Void= c.function // OK
46
+
47
+
let _ :(()->Void)->Void= c.function
48
+
// expected-error@-1 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to specified type '(() -> Void) -> Void'}}
49
+
50
+
}
51
+
52
+
func thinContext(){
53
+
letthin=SR12723_Thin{ app inapp()}
54
+
55
+
proxy(thin.function)
56
+
// expected-error@-1 {{cannot convert value of type '(@convention(thin) () -> Void) -> Void' to expected argument type '(() -> Void) -> Void'}}
57
+
58
+
let _ :(@convention(block)()->Void)->Void= thin.function
59
+
// expected-error@-1 {{cannot convert value of type '(@convention(thin) () -> Void) -> Void' to specified type '(@convention(block) () -> Void) -> Void'}}
60
+
61
+
let _ :(@convention(c)()->Void)->Void= thin.function // OK
62
+
63
+
let _ :(@convention(thin)()->Void)->Void= thin.function // OK
64
+
65
+
let _ :(()->Void)->Void= thin.function
66
+
// expected-error@-1 {{cannot convert value of type '(@convention(thin) () -> Void) -> Void' to specified type '(() -> Void) -> Void'}}
67
+
}
68
+
69
+
func blockContext(){
70
+
letblock=SR12723_Block{ app inapp()}
71
+
72
+
proxy(block.function)
73
+
74
+
let _ :(@convention(block)()->Void)->Void= block.function // OK
75
+
76
+
let _ :(@convention(c)()->Void)->Void= block.function // OK
77
+
78
+
let _ :(@convention(thin)()->Void)->Void= block.function // OK
0 commit comments