-
Couldn't load subscription status.
- Fork 10.6k
Description
Description
Haven't found whether it was reported or not yet...
OpaquePointer is Sendable by documentation and was Sendable in 5.7/5.8.
But in 5.10/nightly I see the following:
09:35:04 Swift.OpaquePointer:1:23: note: struct 'OpaquePointer' does not conform to the 'Sendable' protocol
09:35:04 @frozen public struct OpaquePointer {
Reproduction
final class Foo: Sendable {
let v: OpaquePointer
init(v: OpaquePointer) {
self.v = v
}
}Result:
<source>:2:9: warning: stored property 'v' of 'Sendable'-conforming class 'Foo' has non-sendable type 'OpaquePointer'
let v: OpaquePointer
^
Swift.OpaquePointer:1:23: note: struct 'OpaquePointer' does not conform to the 'Sendable' protocol
@frozen public struct OpaquePointer {
^
Compiler returned: 0
Or build https://github.com/swift-server/swift-kafka-client with 5.10/nightly.
Expected behavior
OpaquePointer should be Sendable by documentation, no warning should be emitted.
Environment
swift nightly: https://ci.swiftserver.group/job/swift-kafka-client-swift-nightly-prb/310/console
swift 5.10: https://ci.swiftserver.group/job/swift-kafka-client-swift510-prb/47/console
Additional information
It is a little bit strange that compiler emits this warning as OpaquePointer is struct and should be Sendable by default (according to documentation)
There is additionally
Reproducible example at godbolt