Browse Source

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 năm trước cách đây
mục cha
commit
b8af1f912a
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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);