Explorar o código

compiler: fix record constructor return type when parsing procedure declaration

git-svn-id: branches/paul/extended_records@16562 -
paul %!s(int64=14) %!d(string=hai) anos
pai
achega
8c56269076
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      compiler/pdecsub.pas

+ 1 - 1
compiler/pdecsub.pas

@@ -1243,7 +1243,7 @@ implementation
                 begin
                   { Set return type, class constructors return the
                     created instance, object constructors return boolean }
-                  if is_class(pd.struct) then
+                  if is_class(pd.struct) or is_record(pd.struct) then
                     pd.returndef:=pd.struct
                   else
 {$ifdef CPU64bitaddr}