From 8b1463aedceb6e7b3e75eb401eb58b99a47fb068 Mon Sep 17 00:00:00 2001 From: sergei Date: Wed, 17 Jul 2013 12:41:55 +0000 Subject: [PATCH] * tprocdef.customprocname: fixed bug introduced in r21069 that was causing result to always contain 'procedure' or 'function' word. These should be included only if pno_proctypeoption flag is given. Resolves #24640. git-svn-id: trunk@25126 - --- compiler/symdef.pas | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 9f367d1ee4..1aa631f318 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -4693,12 +4693,14 @@ implementation potype_destructor: s:=s+'destructor '; else - if (pno_proctypeoption in pno) and - assigned(returndef) and - not(is_void(returndef)) then - s:=s+'function ' - else - s:=s+'procedure '; + if (pno_proctypeoption in pno) then + begin + if assigned(returndef) and + not(is_void(returndef)) then + s:=s+'function ' + else + s:=s+'procedure '; + end; end; if (pno_ownername in pno) and (owner.symtabletype in [recordsymtable,objectsymtable]) then