Browse Source

* fixed counter var checking with funcretn (merged)

peter 25 years ago
parent
commit
91d31892d7
1 changed files with 7 additions and 3 deletions
  1. 7 3
      compiler/tcflw.pas

+ 7 - 3
compiler/tcflw.pas

@@ -325,8 +325,9 @@ implementation
           hp:=hp^.left;
           hp:=hp^.left;
          { we need a simple loadn, but the load must be in a global symtable or
          { we need a simple loadn, but the load must be in a global symtable or
            in the same lexlevel }
            in the same lexlevel }
-         if not(hp^.treetype in [loadn,funcretn]) or
-            ((hp^.symtable^.symtablelevel>1) and (hp^.symtable^.symtablelevel<>lexlevel)) then
+         if (hp^.treetype<>funcretn) and
+            not((hp^.treetype=loadn) and
+                (hp^.symtable^.symtablelevel>1) and (hp^.symtable^.symtablelevel<>lexlevel)) then
           CGMessagePos(hp^.fileinfo,cg_e_illegal_count_var)
           CGMessagePos(hp^.fileinfo,cg_e_illegal_count_var)
          else
          else
           begin
           begin
@@ -635,7 +636,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.5  2000-08-27 16:11:55  peter
+  Revision 1.6  2000-09-03 11:08:42  peter
+    * fixed counter var checking with funcretn (merged)
+
+  Revision 1.5  2000/08/27 16:11:55  peter
     * moved some util functions from globals,cobjects to cutils
     * moved some util functions from globals,cobjects to cutils
     * splitted files into finput,fmodule
     * splitted files into finput,fmodule