[fpc-devel] bug or feature? type alias

Michael Van Canneyt michael at freepascal.org
Mon Nov 2 11:18:16 CET 2026



On Sun, 1 Nov 2026, Martin Frb via fpc-devel wrote:

> TFoo = type TBar
>
> creates a new unique (non assignment compatible) type. At least for 
> non-base types (e.g records).
>
> In the below that works, except the new type is not entirely new.
> If the new type defines another type (nested), then that nested type is 
> still compatible with the nested type of the original.

Yes. Delphi behaves the same.

Michael.


More information about the fpc-devel mailing list