[fpc-pascal] Enum property can't be published
Marco van de Voort
fpc at pascalprogramming.org
Tue Sep 27 11:17:51 CEST 2022
On 27-9-2022 11:14, Hairy Pixels via fpc-pascal wrote:
> I just tried to build a lazarus project using 3.3.1/ppca64 and I’m getting an error that an enum can’t be published. This was working on 3.2.2/ppcx64 so what changed?
>
> =======================================
>
> lazbuild ./pasls.lpi --widgetset=cocoa --compiler=/usr/local/lib/fpc/3.3.1/ppca64 --cpu=aarch64
> Free Pascal Compiler version 3.3.1 [2022/09/15] for aarch64
> Copyright (c) 1993-2022 by Florian Klaempfl and others
> (1002) Target OS: Darwin for AArch64
>
>
> =======================================
>
> TDiagnosticSeverity = ( Error = 1,
> Warning = 2,
> Information = 3,
> Hint = 4
> );
>
>
> TDiagnostic = class (TCollectionItem)
> private
> fSeverity: TDiagnosticSeverity;
> published
> property severity: TDiagnosticSeverity read fSeverity write fSeverity; // error: (3134) This kind of property cannot be published
3.2.2 compiles without warnings, 3.3.1 (i386-win32 from 17 sept:)
ptt.pp(14,44) Warning: This property will not be published
Possibly enums with assigned values (which can have gaps) are not safe
to publish, and this was only now noted?
More information about the fpc-pascal
mailing list