On 2013-04-05 16:03, Vadim Lopatin wrote:

2) Read/write property
    @property T someProperty() { ... }
    @property xxx someProperty(T value) { ... }
    treated as property with name 'someProperty'

BTW, I don't know how to check if property is read/write in compile time.

If there's no better way you can always use __traits(compiles), something like this:

__traits(compiles, { auto c = new Class; T v = c.someProperty; c.someProperty = T.init; });

Currently that will compile regardless of @property or not.

--
/Jacob Carlborg

Reply via email to