소스 검색

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);