Selaa lähdekoodia

* 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 vuotta sitten
vanhempi
commit
8b1463aedc
1 muutettua tiedostoa jossa 8 lisäystä ja 6 poistoa
  1. 8 6
      compiler/symdef.pas

+ 8 - 6
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