Sfoglia il codice sorgente

* don't free node before using its resultdef in an error message

git-svn-id: trunk@28699 -
Jonas Maebe 11 anni fa
parent
commit
d26e6278ba
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      compiler/ngtcon.pas

+ 1 - 1
compiler/ngtcon.pas

@@ -1060,8 +1060,8 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
            (not equal_defs(node.resultdef,def) and
            (not equal_defs(node.resultdef,def) and
             not is_subequal(node.resultdef,def)) then
             not is_subequal(node.resultdef,def)) then
           begin
           begin
-            node.free;
             incompatibletypes(node.resultdef,def);
             incompatibletypes(node.resultdef,def);
+            node.free;
             consume_all_until(_SEMICOLON);
             consume_all_until(_SEMICOLON);
             result:=false;
             result:=false;
             exit;
             exit;