浏览代码

Don't return class instances in parameters even if they are reference counted (might lead to potential problems, but otherwise some of the compiler's expectations regarding class instances fail).

paramgr.pas, tparamanager:
  * handle_common_ret_in_param: even if is_managed_type returns True, don't return a class instance in a parameter

git-svn-id: branches/svenbarth/arc@28870 -
svenbarth 10 年之前
父节点
当前提交
b8af1f912a
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      compiler/paramgr.pas

+ 5 - 1
compiler/paramgr.pas

@@ -597,7 +597,11 @@ implementation
                  is_objectpascal_helper(tdef(pd.owner.defowner))
                )
              )
-           ) or is_managed_type(def) then
+           ) or
+           (
+             is_managed_type(def) and
+             not is_class(def)
+           ) then
           begin
             retinparam:=true;
             exit(true);