On Tuesday, 15 August 2017 at 07:52:17 UTC, Gary Willoughby wrote:
On Tuesday, 15 August 2017 at 03:53:44 UTC, Michael V. Franklin
wrote:
An implementation of binary assignment operators for @property
functions has been submitted to the DMD pull request queue at
https://github.com/dlang/dmd/pull/7079. It addresses the
following issues:
Issue 8006 - Implement proper in-place-modification for
properties
https://issues.dlang.org/show_bug.cgi?id=8006
I thought @property's behaviour had been removed from the
language and even though the attribute remains, it doesn't
actually do anything?
@property changes the typeof result (useful for introspection)
[1][2]:
---
For the expression typeof(exp) where exp is an @property
function, the type is the return type of the function, rather
than the type of the function.
---
---
If the expression is a Property Function, typeof gives its return
type.
---
[1] https://dlang.org/spec/declaration.html#typeof
[2] https://dlang.org/spec/function.html#property-functions