Ryan Joseph schrieb am Di., 4. Sep. 2018,
11:27:
>
>
> > On Sep 4, 2018, at 2:06 PM, Ryan Joseph
> wrote:
> >
> > Sorry I didn’t think enough before I sent this.
> >
> > We *must* allow this assignment to make operator overloads work. +=
> operators are also basically assigning TWrapper to
> On Sep 4, 2018, at 2:06 PM, Ryan Joseph wrote:
>
> Sorry I didn’t think enough before I sent this.
>
> We *must* allow this assignment to make operator overloads work. +=
> operators are also basically assigning TWrapper to TWrapper, right? I guess
> we need to break the default property
> On Sep 4, 2018, at 1:57 PM, Ryan Joseph wrote:
>
> // what happens here? is this a wrong type error (TObject is expected but got
> TWrapper) or do we assign directly to the base record? I can see it both ways
> so I’m not sure what principle to fall back on. Allow it because we can or
>
> On Sep 3, 2018, at 4:39 PM, Maciej Izak wrote:
>
> You can always wait for my implementation because I am working on this (in
> free time, feature rather expected at the end of year) and you can extract
> patch and submit to FPC (or create your own earlier if you wish). "Default
> field
pon., 3 wrz 2018 o 09:15 Ryan Joseph
napisał(a):
> To summarize what I said last time was that I wanted a way to include
> “with” statement functionality in classes and records to aid in delegation
> patterns (in leu of multiple inheritance in Pascal). As it turns out the
> idea is relevant to
I started in on this already and here’s the first conflict I found when trying
operators.
What should happen if you assign a record to another record with a default
property?
var
wrapper: TWrapper;
other: TWrapper;
// this should assign to ‘obj’ via the default property
> On Sep 4, 2018, at 12:35 PM, Sven Barth via fpc-pascal
> wrote:
>
> I think you need to be clearer what you want to achieve in the end. The
> default property as intended by Maciej has the idea that it hoists the
> operators of the default property type to the record it is contained in.
>