[Issue 18876] Contradiction in Spec Concerning Properties

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 1 08:14:02 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18876

Jonathan M Davis <issues.dlang at jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang at jmdavisProg.co
                   |                            |m

--- Comment #1 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
The cases of a free function used without UFCS, a free function used with UFCS,
and a member function are all different, and the number of parameters required
differs. So, the spec needs to be clarified in that respect. Point #8 is
correct for a free function used without UFCS or a member function, but it's
wrong for a free function used with UFCS. A free function used with UFCS needs
on extra parameter for both the getter and setter - hence why it's possible to
have a setter property with two parameters.

But regardless, that whole section of the spec needs to be rewritten anyway,
since while it was intended at one point that property functions be controlled
by @property, that never actually happened. So, all of these rules relate to
using any function as a property and aren't actually affected by @property.

--


More information about the Digitalmars-d-bugs mailing list