mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-22 15:39:45 +01:00
* don't warn about unsed symbols in generic procedures/methods, resolves #18907
git-svn-id: trunk@18226 -
This commit is contained in:
parent
c32bc3a22a
commit
2f58065873
@ -637,14 +637,18 @@ implementation
|
|||||||
((tsym(sym).owner.symtabletype in
|
((tsym(sym).owner.symtabletype in
|
||||||
[parasymtable,localsymtable,ObjectSymtable,recordsymtable,staticsymtable])) then
|
[parasymtable,localsymtable,ObjectSymtable,recordsymtable,staticsymtable])) then
|
||||||
begin
|
begin
|
||||||
{ unused symbol should be reported only if no }
|
{ unused symbol should be reported only if no }
|
||||||
{ error is reported }
|
{ error is reported }
|
||||||
{ if the symbol is in a register it is used }
|
{ if the symbol is in a register it is used }
|
||||||
{ also don't count the value parameters which have local copies }
|
{ also don't count the value parameters which have local copies }
|
||||||
{ also don't claim for high param of open parameters (PM) }
|
{ also don't claim for high param of open parameters (PM) }
|
||||||
|
{ also don't complain about unused symbols in generic procedures }
|
||||||
|
{ and methods }
|
||||||
if (Errorcount<>0) or
|
if (Errorcount<>0) or
|
||||||
([vo_is_hidden_para,vo_is_funcret] * tabstractvarsym(sym).varoptions = [vo_is_hidden_para]) or
|
([vo_is_hidden_para,vo_is_funcret] * tabstractvarsym(sym).varoptions = [vo_is_hidden_para]) or
|
||||||
(sp_internal in tsym(sym).symoptions) then
|
(sp_internal in tsym(sym).symoptions) or
|
||||||
|
((assigned(tsym(sym).owner.defowner) and
|
||||||
|
(df_generic in tprocdef(tsym(sym).owner.defowner).defoptions))) then
|
||||||
exit;
|
exit;
|
||||||
if (tstoredsym(sym).refs=0) then
|
if (tstoredsym(sym).refs=0) then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user