瀏覽代碼

* Bug fix where copied block nodes didn't inherit the original's flags

J. Gareth "Curious Kit" Moreton 1 年之前
父節點
當前提交
edc1c79cbb
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      compiler/nbas.pas

+ 8 - 0
compiler/nbas.pas

@@ -124,6 +124,7 @@ interface
           destructor destroy; override;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
+          function dogetcopy : tnode;override;
           function simplify(forinline : boolean) : tnode; override;
           function pass_1 : tnode;override;
           function pass_typecheck:tnode;override;
@@ -734,6 +735,13 @@ implementation
       end;
 
 
+    function tblocknode.dogetcopy : tnode;
+      begin
+        Result:=inherited dogetcopy;
+        TBlockNode(Result).blocknodeflags:=blocknodeflags;
+      end;
+
+
     function NodesEqual(var n: tnode; arg: pointer): foreachnoderesult;
       begin
         if n.IsEqual(tnode(arg)) then