mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 16:29:27 +01:00
compiler: fix is_visible_for_object for nested specialization
git-svn-id: trunk@14243 -
This commit is contained in:
parent
b19f79bc58
commit
f0c57aa76e
@ -1568,8 +1568,18 @@ implementation
|
||||
begin
|
||||
{ private symbols are allowed when we are in the same
|
||||
module as they are defined }
|
||||
result:=(symownerdef.owner.symtabletype in [globalsymtable,staticsymtable]) and
|
||||
(symownerdef.owner.iscurrentunit);
|
||||
result:=(
|
||||
(symownerdef.owner.symtabletype in [globalsymtable,staticsymtable]) and
|
||||
(symownerdef.owner.iscurrentunit)
|
||||
) or
|
||||
( // the case of specialize inside the generic declaration
|
||||
(symownerdef.owner.symtabletype = objectsymtable) and
|
||||
assigned(current_objectdef) and
|
||||
(
|
||||
(current_objectdef=symownerdef) or
|
||||
(current_objectdef.owner.moduleid=symownerdef.owner.moduleid)
|
||||
)
|
||||
);
|
||||
end;
|
||||
vis_strictprivate :
|
||||
begin
|
||||
@ -1596,6 +1606,14 @@ implementation
|
||||
(contextobjdef.owner.symtabletype in [globalsymtable,staticsymtable]) and
|
||||
(contextobjdef.owner.iscurrentunit) and
|
||||
contextobjdef.is_related(symownerdef)
|
||||
) or
|
||||
( // the case of specialize inside the generic declaration
|
||||
(symownerdef.owner.symtabletype = objectsymtable) and
|
||||
assigned(current_objectdef) and
|
||||
(
|
||||
(current_objectdef=symownerdef) or
|
||||
(current_objectdef.owner.moduleid=symownerdef.owner.moduleid)
|
||||
)
|
||||
)
|
||||
);
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user