> On Sep 4, 2018, at 1:57 PM, Ryan Joseph <r...@thealchemistguild.com> 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 
> prevent it because it’s not intended functionality?
> wrapper := other;

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 behavior is instances that the same type is being 
assigned to itself but correct me if I’m wrong.

var
        wrapper: TWrapper;

wrapper += 10;

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to