From beebcdebfc04fa674416e5b494c0b9c846f85e14 Mon Sep 17 00:00:00 2001 From: pierre Date: Sun, 9 Jan 2000 00:37:56 +0000 Subject: [PATCH] * avoid testing object types that are simple aliases for unused privates --- compiler/symtable.pas | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/compiler/symtable.pas b/compiler/symtable.pas index 8196aed1fc..e2f779c669 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -1136,6 +1136,7 @@ implementation begin if (Errorcount<>0) then exit; + { do not claim for inherited private fields !! } if (psym(p)^.refs=0) and (psym(p)^.owner^.symtabletype=objectsymtable) then MessagePos2(psym(p)^.fileinfo,sym_n_private_method_not_used,psym(p)^.owner^.name^,p^.name) { units references are problematic } @@ -1157,8 +1158,12 @@ implementation procedure objectprivatesymbolused(p : pnamedindexobject); begin + { + Don't test simple object aliases PM + } if (psym(p)^.typ=typesym) and - (ptypesym(p)^.restype.def^.deftype=objectdef) then + (ptypesym(p)^.restype.def^.deftype=objectdef) and + (ptypesym(p)^.restype.def^.typesym=ptypesym(p)) then pobjectdef(ptypesym(p)^.restype.def)^.symtable^.foreach( {$ifndef TP}@{$endif}TestPrivate); end; @@ -2766,7 +2771,10 @@ implementation end. { $Log$ - Revision 1.73 2000-01-07 01:14:41 peter + Revision 1.74 2000-01-09 00:37:56 pierre + * avoid testing object types that are simple aliases for unused privates + + Revision 1.73 2000/01/07 01:14:41 peter * updated copyright to 2000 Revision 1.72 2000/01/03 19:26:04 peter @@ -2908,4 +2916,4 @@ end. * oldtp mode directives better supported * added some messages to errore.msg -} +} \ No newline at end of file