Skip to content

Why can I mark a Sendable value sending #74616

Open
@mattmassicotte

Description

@mattmassicotte

Description

It's possible this is expected, but it seems to me like maybe this should be a warning?

Reproduction

struct ThisIsSendable: Sendable {
}

// feels redundant, no?
func acceptStuff(_ value: sending ThisIsSendable) {
}

Expected behavior

I would expect a warning. The sending is redundant. And if something changed such that it became necessary, that would immeidately be surfaced within the function body as an error.

Environment

Apple Swift version 6.0-dev (LLVM 5f87d6ee2f8c800, Swift 5c01ca1)
Target: arm64-apple-macosx14.0

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.concurrencyFeature: umbrella label for concurrency language features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions