Skip to content

Docs state that accessor macros require the names: argument, but in reality they do not #374

@daltonclaybrook

Description

@daltonclaybrook

Location

https://docs.swift.org/swift-book/documentation/the-swift-programming-language/attributes/#attached

Description

The documentation for the @attached macro attribute states the following:

The peer, member, and accessor macro roles require a names: argument, listing the names of the symbols that the macro generates.

But in reality, accessor macros do not require the names: argument as they simply generate accessors for the stored property they're attached to. (See discussion on the Swift forums)

Correction

The sentence should be changed to:

The peer and member macro roles require a names: argument, listing the names of the symbols that the macro generates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions