瀏覽代碼

* 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 -
sergei 12 年之前
父節點
當前提交
8b1463aedc
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      compiler/symdef.pas

+ 8 - 6
compiler/symdef.pas

@@ -4693,12 +4693,14 @@ implementation
               potype_destructor:
               potype_destructor:
                 s:=s+'destructor ';
                 s:=s+'destructor ';
               else
               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;
             end;
             if (pno_ownername in pno) and
             if (pno_ownername in pno) and
                (owner.symtabletype in [recordsymtable,objectsymtable]) then
                (owner.symtabletype in [recordsymtable,objectsymtable]) then