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); message(parser_e_no_property_found_to_override);
end; end;
end; end;
{ ignore is_publishable for interfaces (related to $M+ directive). if ((p.visibility=vis_published) or is_dispinterface(astruct)) then
$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
begin begin
if p.propdef.is_publishable=pp_error then { ignore is_publishable for interfaces (related to $M+ directive).
Message(parser_e_cant_publish_that_property) $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 else
Message(parser_w_ignoring_published_property); if (p.propdef.is_publishable=pp_ignore) and not is_interface(astruct) then
p.visibility:=vis_public; begin
Message(parser_w_ignoring_published_property);
p.visibility:=vis_public;
end;
end; end;
if not(is_dispinterface(astruct)) then if not(is_dispinterface(astruct)) then