On 26 November 2012 17:44, Adam D. Ruppe <destructionator@gmail.com> wrote:
On Monday, 26 November 2012 at 15:39:35 UTC, Manu wrote:I think this will do it:
Properties look like variables. How do I distinguish properties from proper variables?
import std.traits;
bool isProperty = (functionAttributes!(S.P) & FunctionAttributes.property) ? true : false
The way that works in the implementation is checking the mangled name of the function. I wouldn't try anything else because any other difference between a property and a variable is arguably a bug since they are supposed to be mostly interchangable!