do not publish enums with jumps - keep error on static properties

This commit is contained in:
Ondrej Pokorny 2022-08-16 22:41:25 +02:00
parent 55629aeb19
commit 761f65cef8

View File

@ -515,18 +515,22 @@ implementation
message(parser_e_no_property_found_to_override);
end;
end;
{ ignore is_publishable for interfaces (related to $M+ directive).
$M has effect on visibility of default section for classes.
Interface has always only public section (fix for problem in tb0631.pp) }
if ((p.visibility=vis_published) or is_dispinterface(astruct)) and
((not(p.propdef.is_publishable=pp_publish) and not is_interface(astruct)) or
(sp_static in p.symoptions)) then
if ((p.visibility=vis_published) or is_dispinterface(astruct)) then
begin
if p.propdef.is_publishable=pp_error then
Message(parser_e_cant_publish_that_property)
{ ignore is_publishable for interfaces (related to $M+ directive).
$M has effect on visibility of default section for classes.
Interface has always only public section (fix for problem in tb0631.pp) }
if (sp_static in p.symoptions) or ((p.propdef.is_publishable=pp_error) and not is_interface(astruct)) then
begin
Message(parser_e_cant_publish_that_property);
p.visibility:=vis_public;
end
else
Message(parser_w_ignoring_published_property);
p.visibility:=vis_public;
if (p.propdef.is_publishable=pp_ignore) and not is_interface(astruct) then
begin
Message(parser_w_ignoring_published_property);
p.visibility:=vis_public;
end;
end;
if not(is_dispinterface(astruct)) then