Browse Source

* moved some code from exitnode.create to det_resulttype

peter 24 years ago
parent
commit
a786029a13
1 changed files with 17 additions and 15 deletions
  1. 17 15
      compiler/nflw.pas

+ 17 - 15
compiler/nflw.pas

@@ -620,11 +620,16 @@ implementation
 *****************************************************************************}
 *****************************************************************************}
 
 
     constructor texitnode.create(l:tnode);
     constructor texitnode.create(l:tnode);
-      var
-         pt : tnode;
       begin
       begin
         inherited create(exitn,l);
         inherited create(exitn,l);
+      end;
+
 
 
+    function texitnode.det_resulttype:tnode;
+      var
+         pt : tnode;
+      begin
+        result:=nil;
         { Check the 2 types }
         { Check the 2 types }
         if assigned(left) then
         if assigned(left) then
          begin
          begin
@@ -635,18 +640,12 @@ implementation
               left:=cassignmentnode.create(pt,left);
               left:=cassignmentnode.create(pt,left);
             end;
             end;
          end;
          end;
-      end;
-
-
-    function texitnode.det_resulttype:tnode;
-      begin
-        result:=nil;
-         if assigned(left) then
-           begin
-              resulttypepass(left);
-              set_varstate(left,true);
-              procinfo^.funcret_state:=vs_assigned;
-           end;
+        if assigned(left) then
+         begin
+           resulttypepass(left);
+           set_varstate(left,true);
+           procinfo^.funcret_state:=vs_assigned;
+         end;
         resulttype:=voidtype;
         resulttype:=voidtype;
       end;
       end;
 
 
@@ -1169,7 +1168,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.19  2001-04-21 15:36:29  peter
+  Revision 1.20  2001-04-26 21:56:08  peter
+    * moved some code from exitnode.create to det_resulttype
+
+  Revision 1.19  2001/04/21 15:36:29  peter
     * fixed crash with for counter
     * fixed crash with for counter
 
 
   Revision 1.18  2001/04/15 09:48:30  peter
   Revision 1.18  2001/04/15 09:48:30  peter