浏览代码

compiler: fix nested class types and consts usage outside class declaration

git-svn-id: trunk@14615 -
paul 15 年之前
父节点
当前提交
6e51a4d4a9
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/pexpr.pas

+ 4 - 0
compiler/pexpr.pas

@@ -1250,10 +1250,14 @@ implementation
                    end;
                  typesym:
                    begin
+                     p1.free;
                      p1:=ctypenode.create(ttypesym(sym).typedef);
+                     if not(block_type in [bt_type,bt_const_type,bt_var_type]) then
+                       p1:=cloadvmtaddrnode.create(p1);
                    end;
                  constsym:
                    begin
+                     p1.free;
                      p1:=genconstsymtree(tconstsym(sym));
                    end
                  else