Browse Source

* support propagating a function result (if any) from functions called
via tsk_anon_inherited synthetic functions

git-svn-id: branches/jvmbackend@18714 -

Jonas Maebe 14 years ago
parent
commit
57c7e21d8f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      compiler/symcreat.pas

+ 5 - 1
compiler/symcreat.pas

@@ -308,7 +308,11 @@ implementation
       isclassmethod:=
         (po_classmethod in pd.procoptions) and
         not(pd.proctypeoption in [potype_constructor,potype_destructor]);
-      str:='begin inherited end;';
+      str:='begin ';
+      if (pd.proctypeoption<>potype_constructor) and
+         not is_void(pd.returndef) then
+        str:=str+'result:=';
+      str:=str+'inherited end;';
       str_parse_method_impl(str,pd,isclassmethod);
     end;