UFCS & overloaded property getters/setters
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jun 14 03:13:20 PDT 2014
On 2014-06-13 20:16, H. S. Teoh via Digitalmars-d wrote:
> I think this is starting to show itself as an anti-pattern, or at least,
> one of those obscure dark corners of D infested with complex
> interactions between unexpected features and possible compiler quirks.
> Probably the best thing to do is to make both getter and setter final,
> and add an overloadable onPropSet() method that the derived class can
> use to customize the property.
I don't think this is the case here. It is as Jonathan described it. A
base class and a subclass have different overload sets [1].
[1] http://dlang.org/hijack.html search for "Derived Class Member
Function Hijacking"
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list