Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spec/function.dd
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,8 @@ $(H2 $(LNAME2 property-functions, Property Functions))

$(UL
$(LI $(D @property) functions cannot be overloaded with non-$(D @property) functions with the same name.)
$(LI $(D @property) functions can only have zero, one or two parameters.)
$(LI $(D @property) functions can only have zero or one parameter if they are non-static members.)
$(LI $(D @property) functions can only have one or two parameters if they are non-members.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does static have to do with anything? Whether the member function is static or not, if it's a getter or a setter that returns by ref, it has no parameters, and if it's a setter that does not return by ref it has one parameter. If it's a free function, then a getter has zero parameters and is used by itself, or it has one parameter and is used with UFCS, and if it's a setter, then it either has one parameter if it's used without UFCS and two if it's used with UFCS. static has no effect on any of this.

$(LI $(D @property) functions cannot have variadic parameters.)
$(LI For the expression $(D typeof(exp)) where $(D exp) is an $(D @property) function,
the type is the return type of the function, rather than the type of the function.)
Expand Down