Interaction of inheritance with property functions

2018-06-07 Thread Luís Marques via Digitalmars-d
I had something like this: class Bits { int width() { return _width; } void width(int _width) { this._width = _width; } int _width; } class Bool : Bits { // make sure a Boolean is always 1 bit override int width() { assert(_width

Re: Interaction of inheritance with property functions

2018-06-07 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 8 June 2018 at 01:07:17 UTC, Luís Marques wrote: Shouldn't the property functions' resolution logic take into account the inherited functions? I had assumed that was the case (and I was confused by misleading error messages), and that seems like the more intuitive semantics to me.