Browse Source

compiler: fix record constructor return type when parsing procedure declaration

git-svn-id: branches/paul/extended_records@16562 -
paul 14 years ago
parent
commit
8c56269076
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/pdecsub.pas

+ 1 - 1
compiler/pdecsub.pas

@@ -1243,7 +1243,7 @@ implementation
                 begin
                 begin
                   { Set return type, class constructors return the
                   { Set return type, class constructors return the
                     created instance, object constructors return boolean }
                     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
                     pd.returndef:=pd.struct
                   else
                   else
 {$ifdef CPU64bitaddr}
 {$ifdef CPU64bitaddr}