浏览代码

* ttypeconvnode.typecheck_arrayconstructor_to_dynarray: use ctempcreatenode.create_value() instead of create() to get rid of the explicit addition of an assignment node

git-svn-id: trunk@36244 -
svenbarth 8 年之前
父节点
当前提交
b78037f6f2
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      compiler/ncnv.pas

+ 1 - 6
compiler/ncnv.pas

@@ -1940,14 +1940,9 @@ implementation
           end;
 
         { get temp for array of lengths }
-        temp2:=ctempcreatenode.create(sinttype,sinttype.size,tt_persistent,false);
+        temp2:=ctempcreatenode.create_value(sinttype,sinttype.size,tt_persistent,false,cordconstnode.create(paracount,s32inttype,true));
         addstatement(newstatement,temp2);
 
-        { one dimensional }
-        addstatement(newstatement,cassignmentnode.create(
-            ctemprefnode.create(temp2),
-            cordconstnode.create
-               (paracount,s32inttype,true)));
         { create call to fpc_dynarr_setlength }
         addstatement(newstatement,ccallnode.createintern('fpc_dynarray_setlength',
             ccallparanode.create(caddrnode.create_internal