Re: [fpc-devel] Allow object type property getter to expose a field as one of its base/parent types (patch included)

2020-08-11 Thread Kostas Michalopoulos via fpc-devel
Any further thoughts on this? I am already using it in a new project for quite some time now and it has proven to be very useful in several cases by exposing read only views of the same container that is used internally by classes without additional boilerplate and with fast access and rtti

Re: [fpc-devel] Allow object type property getter to expose a field as one of its base/parent types (patch included)

2020-06-13 Thread Kostas Michalopoulos via fpc-devel
On Sat, Jun 13, 2020 at 12:07 PM Sven Barth via fpc-devel wrote: > I'm against it. It would essentially mean that you can't use the same > field for the setter or that you'd need to go through a method. > Exchanging one restriction (can't use a base class for the property) for > another (can't

Re: [fpc-devel] Allow object type property getter to expose a field as one of its base/parent types (patch included)

2020-06-13 Thread Sven Barth via fpc-devel
Am 04.06.2020 um 03:45 schrieb Kostas Michalopoulos via fpc-devel: Hello, I'd like to add a small feature for property getters to allow themselves be exposed as a base type of the real field. Example: === program ExposeDerivedAsBase; {$mode objfpc} type TBase = class end; TDerived =

[fpc-devel] Allow object type property getter to expose a field as one of its base/parent types (patch included)

2020-06-03 Thread Kostas Michalopoulos via fpc-devel
Hello, I'd like to add a small feature for property getters to allow themselves be exposed as a base type of the real field. Example: === program ExposeDerivedAsBase; {$mode objfpc} type TBase = class end; TDerived = class(TBase) end; TSomething = class private FProp: TDerived;