Selaa lähdekoodia

* better error message if a procedure declaration is closed by a colon, resolves #27388

git-svn-id: trunk@29592 -
florian 10 vuotta sitten
vanhempi
commit
a436dafd68
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      compiler/pdecsub.pas

+ 1 - 1
compiler/pdecsub.pas

@@ -1358,7 +1358,7 @@ implementation
         { support procedure proc stdcall export; }
         { support procedure proc stdcall export; }
         if not(check_proc_directive(false)) then
         if not(check_proc_directive(false)) then
           begin
           begin
-            if (token=_COLON) then
+            if (token=_COLON) and not(Assigned(pd) and is_void(pd.returndef)) then
               begin
               begin
                 message(parser_e_field_not_allowed_here);
                 message(parser_e_field_not_allowed_here);
                 consume_all_until(_SEMICOLON);
                 consume_all_until(_SEMICOLON);