fcl-passrc: useanalyzer: mark attributes of class/record type even if typeinfo is not used

git-svn-id: trunk@47283 -
This commit is contained in:
Mattias Gaertner 2020-11-02 15:03:50 +00:00
parent 58a56e38d1
commit 6ed331d6e7
2 changed files with 9 additions and 2 deletions
packages/fcl-passrc

View File

@ -2388,6 +2388,8 @@ begin
RaiseNotSupported(20180328224632,aClass,GetObjName(o));
end;
end;
UseAttributes(El);
end;
procedure TPasAnalyzer.UseClassConstructor(El: TPasMembersType);

View File

@ -3428,15 +3428,20 @@ begin
' TObject = class',
' constructor {#TObject_Create_used}Create;',
' end;',
' {#TRedAttribute_notused}TRedAttribute = class',
' end;',
' {#TCustomAttribute_used}TCustomAttribute = class',
' end;',
' [TCustom]',
' TBird = class;',
' TMyInt = word;',
' TBird = class end;',
'constructor TObject.Create; begin end;',
'constructor TObject.Create;',
'begin',
' if typeinfo(TBird)=nil then ;',
'end;',
'var b: TBird;',
'begin',
' b:=TBird.Create;',
'']);
AnalyzeWholeProgram;
end;