-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed as not planned
Closed as not planned
Copy link
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels
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
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels