Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot opt back into checked Sendable conformance #74498

Open
mattmassicotte opened this issue Jun 17, 2024 · 2 comments
Open

Cannot opt back into checked Sendable conformance #74498

mattmassicotte opened this issue Jun 17, 2024 · 2 comments
Labels
concurrency Feature: umbrella label for concurrency language features feature A feature request or implementation

Comments

@mattmassicotte
Copy link

Description

I was surprised to see that I cannot opt back into a checked Sendable conformance to silence this warning.

Reproduction

class A: @unchecked Sendable {
}

final class B: A, Sendable {
}

Expected behavior

I would expect this code to be warning free.

Environment

Apple Swift version 6.0-dev (LLVM 6e13b8be259f20f, Swift 372de46)
Target: arm64-apple-macosx14.0

Additional information

No response

@mattmassicotte mattmassicotte added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Jun 17, 2024
@hborla
Copy link
Member

hborla commented Jul 14, 2024

Yeah, I don't know how to actually allow this, because the compiler cannot check anything that's inherited from the superclass, so you'd get a false sense of promise that your type really has a checked Sendable conformance.

@hborla hborla added concurrency Feature: umbrella label for concurrency language features feature A feature request or implementation and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Jul 14, 2024
@mattmassicotte
Copy link
Author

My naive assumption was that the compiler could perform the same checking as it would if the superclass was checked-Sendable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concurrency Feature: umbrella label for concurrency language features feature A feature request or implementation
Projects
None yet
Development

No branches or pull requests

2 participants