mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 09:29:35 +02:00
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:
parent
58a56e38d1
commit
6ed331d6e7
packages/fcl-passrc
@ -2388,6 +2388,8 @@ begin
|
||||
RaiseNotSupported(20180328224632,aClass,GetObjName(o));
|
||||
end;
|
||||
end;
|
||||
|
||||
UseAttributes(El);
|
||||
end;
|
||||
|
||||
procedure TPasAnalyzer.UseClassConstructor(El: TPasMembersType);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user