mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:29:32 +02:00
Add name of unit for return type if not from current module in tprocdef.customprocname
This commit is contained in:
parent
9c7d1515bf
commit
2187bfaddd
@ -6772,8 +6772,9 @@ implementation
|
||||
|
||||
function tprocdef.customprocname(pno: tprocnameoptions):ansistring;
|
||||
var
|
||||
s, rn : ansistring;
|
||||
s, hs, rn : ansistring;
|
||||
t : ttoken;
|
||||
module : tmodule;
|
||||
syssym : tsyssym;
|
||||
begin
|
||||
{$ifdef EXTDEBUG}
|
||||
@ -6850,7 +6851,23 @@ implementation
|
||||
potype_class_constructor,potype_class_destructor]) and
|
||||
assigned(returndef) and
|
||||
not(is_void(returndef)) then
|
||||
s:=s+':'+returndef.GetTypeName;
|
||||
begin
|
||||
if assigned(returndef.typesym) then
|
||||
begin
|
||||
module:=find_module_from_symtable(returndef.typesym.owner);
|
||||
if module <> current_module then
|
||||
s:=s+':'+module.realmodulename^+'.'
|
||||
else
|
||||
s:=s+':';
|
||||
hs:=returndef.typesym.realname;
|
||||
if hs[1]<>'$' then
|
||||
s:=s+returndef.OwnerHierarchyName+hs
|
||||
else
|
||||
s:=s+returndef.GetTypeName;
|
||||
end
|
||||
else
|
||||
s:=s+':'+returndef.GetTypeName;
|
||||
end;
|
||||
if not (po_anonymous in procoptions) then
|
||||
if assigned(owner) and (owner.symtabletype=localsymtable) then
|
||||
s:=s+' is nested'
|
||||
|
Loading…
Reference in New Issue
Block a user