Skip to content

@Sendable does not peer through typealiases #62753

Open
@compnerd

Description

@compnerd
typealias FType = (Int) -> Void
func f(_: @Sendable FType) {
}

This yields:

error: @Sendable attribute only applies to function types
func f(_: @Sendable FType) {
                    ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    attributesFeature: Declaration and type attributesbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuressugared typesFeature: sugared types, e.g. 'Int?' or '[Int]'type checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions