Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
b8af1f912a
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  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);