Avatar
Avatar
Iceman
@swift-6.2.3 @swift-6.1.3 @swift-6.0.3 -swift-version 6 func useSendable(_: some Sendable) {} struct S { func f() {} } class C { func f() {} } let s = S() let c = C() useSendable(s.f) useSendable(c.f) (edited)
exit status 1 with stderr:<stdin>:11:1: error: type '() -> ()' does not conform to the 'Sendable' protocol 9 | let c = C() 10 | useSendable(s.f) 11 | useSendable(c.f) | |- error: type '() -> ()' does not conform to the 'Sendable' protocol | `- note: a function type must be marked '@Sendable' to conform to 'Sendable' 12 | (edited)