Bladeren bron

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 jaren geleden
bovenliggende
commit
b8af1f912a
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5 1
      compiler/paramgr.pas

+ 5 - 1
compiler/paramgr.pas

@@ -597,7 +597,11 @@ implementation
                  is_objectpascal_helper(tdef(pd.owner.defowner))
                  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
           begin
             retinparam:=true;
             retinparam:=true;
             exit(true);
             exit(true);