From 370883c86a97a82b79d67c231b88ad7cd7144e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Van=20Canneyt?= Date: Wed, 29 Jan 2025 21:43:42 +0100 Subject: [PATCH] * Fix generating docs --- packages/fcl-passrc/src/pastree.pp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/fcl-passrc/src/pastree.pp b/packages/fcl-passrc/src/pastree.pp index cef81cd6e7..2e2e316069 100644 --- a/packages/fcl-passrc/src/pastree.pp +++ b/packages/fcl-passrc/src/pastree.pp @@ -5345,19 +5345,22 @@ begin T:=T+' '+SafeName; S.Add(T); end; - ProcType.GetArguments(S); - If (ProcType is TPasFunctionType) - and Assigned(TPasFunctionType(Proctype).ResultEl) then - With TPasFunctionType(ProcType).ResultEl.ResultType do - begin - T:=' : '; - If (Name<>'') then - T:=T+SafeName - else - T:=T+GetDeclaration(False); - S.Add(T); - end; - GetModifiers(S); + if Assigned(ProcType) then + begin + ProcType.GetArguments(S); + If (ProcType is TPasFunctionType) + and Assigned(TPasFunctionType(Proctype).ResultEl) then + With TPasFunctionType(ProcType).ResultEl.ResultType do + begin + T:=' : '; + If (Name<>'') then + T:=T+SafeName + else + T:=T+GetDeclaration(False); + S.Add(T); + end; + GetModifiers(S); // needs proctype + end; Result:=IndentStrings(S,Length(S[0])); finally S.Free;