Avatar
Avatar
omochimetaru
@swift-5.7.3 protocol P { } struct S<T> {} extension S: P where T: Sendable {} func main(_ a: Any) { if let p = a as? any P { print(1) } else { print(2) } } main((1, 2))
exit status: 1 with stderr:<stdin>:3:1: error: conditional conformance to non-marker protocol 'P' cannot depend on conformance of 'T' to non-marker protocol 'Sendable' extension S: P where T: Sendable {} ^ <stdin>:5:10: warning: value 'p' was defined but never used; consider replacing with boolean test if let p = a as? any P { ~~~~^~~~ ~~~ is