[fpc-devel] Delphi compatible?
Ondrej Pokorny
lazarus at kluug.net
Tue Nov 17 11:40:57 CET 2026
On 11/17/2026 11:18 AM, Martin Frb via fpc-devel wrote:
> Could someone please check in Delphi?
>
> Are the below supposed to be assignment compatible?
> (same for "set of")
>
>
> program Project1;
> {$Mode delphi}
> type
> TEnumA = (a1,a2,a3);
> TEnumB = type TEnumA;
> var
> a: TEnumA;
> b: TEnumB;
> begin
> a := b;
> b := a;
> end.
Yes, they are
assignment-compatible. https://docwiki.embarcadero.com/RADStudio/Florence/en/Type_Compatibility_and_Identity_(Delphi)
For var parameters, they are not compatible.
https://docwiki.embarcadero.com/RADStudio/Florence/en/Data_Types,_Variables,_and_Constants_Index_(Delphi)
Ondrej
More information about the fpc-devel
mailing list