浏览代码

* Make SetLength() to emit hint "Local variable "s" of a managed type does not seem to be initialized" instead of the warning. This change is needed because when calling a regular procedure with a ver parameter of a managed type the hint is generated. Now SetLength() behaves the same.

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

+ 1 - 1
compiler/ninl.pas

@@ -1740,7 +1740,7 @@ implementation
         { last param must be var }
         { last param must be var }
         destppn:=ppn.left;
         destppn:=ppn.left;
         valid_for_var(destppn,true);
         valid_for_var(destppn,true);
-        set_varstate(destppn,vs_written,[vsf_must_be_valid]);
+        set_varstate(destppn,vs_written,[vsf_must_be_valid,vsf_use_hints]);
         { first param must be a string or dynamic array ...}
         { first param must be a string or dynamic array ...}
         isarray:=is_dynamic_array(destppn.resultdef);
         isarray:=is_dynamic_array(destppn.resultdef);
         if not((destppn.resultdef.typ=stringdef) or
         if not((destppn.resultdef.typ=stringdef) or