Hi,
Overloading the := (assignment) operator for equal types is forbidden.
Out of curiosity I would like to know why that is?
When you have e.g. a record definition containing a dynamic array, not
being able to overload the assignment operator is just a PITA.
OK, once you know why the
> On Apr 24, 2024, at 4:59 PM, Bart via fpc-devel
> wrote:
>
> In such instances it would really be helpfull if you could just
> overload the assignment operator like:
> operator := (Src: TRec): TRec;
> begin
> Result := AssignRec(Src);
> end;
I agree this seems reasonable but maybe the
the system and the fpintres units have to be precompiled!
I would wish me a reasonable error message from the compiler to avoid
all this discussion
___
fpc-devel maillist - fpc-devel@lists.freepascal.org