I used to register only the following on an object: (from C++)
CSomething@ get_Something() property;
void set_Something(CSomething@ value) property;
And I would omit the setter function if it's read-only.
This works very well, but I need to have a separate const method now too. For example, the following declarations:
CSomething@ get_Something() property;
const CSomething@ get_Something() const property;
void set_Something(CSomething@ value) property;
This however gives an error when I try using the const getter:
The property 'Something' has mismatching types for the get and set accessors
const CSomething@ CFoo::get_Something() const
void CFoo::set_Something(CSomething@)
Is it still possible to do something like this?
(Ps: I am using asEP_PROPERTY_ACCESSOR_MODE = 2, so I don't actually pass the “property” decorator, if that makes any difference.)