Skip to content

Commit f69e312

Browse files
authored
Fix list of macro roles that need "names:" argument (#375)
Fixes: #374 Reviewed-by: Holly Borla <[email protected]>
2 parents f365934 + c70c364 commit f69e312

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

TSPL.docc/ReferenceManual/Attributes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ indicates the macro's role:
9797
on an extension, a type alias, or a type that's nested inside a function,
9898
or use an extension macro to add an extension that has a peer macro.
9999

100-
The peer, member, and accessor macro roles require a `names:` argument,
100+
The peer and member macro roles require a `names:` argument,
101101
listing the names of the symbols that the macro generates.
102+
The accessor macro role requires a `names:` argument if the
103+
macro generates a `willSet` or `didSet` property observer. An
104+
accessor macro that generates property observers can't add
105+
other accessors, because observers only apply to stored properties.
102106
The extension macro role also requires a `names:` argument
103107
if the macro adds declarations inside the extension.
104108
When a macro declaration includes the `names:` argument,

0 commit comments

Comments
 (0)