浏览代码

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

git-svn-id: trunk@28699 -
Jonas Maebe 11 年之前
父节点
当前提交
d26e6278ba
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 is_subequal(node.resultdef,def)) then
           begin
-            node.free;
             incompatibletypes(node.resultdef,def);
+            node.free;
             consume_all_until(_SEMICOLON);
             result:=false;
             exit;