mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:39:18 +02:00
do not publish enums with jumps - keep error on static properties
This commit is contained in:
parent
55629aeb19
commit
761f65cef8
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user