From a5a695d1419816442f11f641530a73a33379bb85 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 13 Apr 2001 23:49:24 +0000 Subject: [PATCH] * when errors are found don't generate code, but still run the resulttype pass --- compiler/psub.pas | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/compiler/psub.pas b/compiler/psub.pas index a96febf000..dbcef30a68 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -53,7 +53,7 @@ implementation nbas, { pass 2 } {$ifndef NOPASS2} - pass_2, + pass_1,pass_2, {$endif} { parser } scanner, @@ -337,10 +337,15 @@ implementation oldaktmaxfpuregisters:=aktmaxfpuregisters; aktmaxfpuregisters:=localmaxfpuregisters; {$ifndef NOPASS2} - { only generate the code if no type errors are found } - if assigned(code) and - (status.errorcount=0) then - generatecode(code); + if assigned(code) then + begin + { only generate the code if no type errors are found, else + finish at least the type checking pass } + if (status.errorcount=0) then + generatecode(code) + else + do_resulttypepass(code); + end; { set switches to status at end of procedure } aktlocalswitches:=exitswitches; @@ -809,7 +814,11 @@ implementation end. { $Log$ - Revision 1.28 2001-04-13 17:59:03 peter + Revision 1.29 2001-04-13 23:49:24 peter + * when errors are found don't generate code, but still run the + resulttype pass + + Revision 1.28 2001/04/13 17:59:03 peter * don't generate code when there is already an error Revision 1.27 2001/04/13 01:22:13 peter