Browse Source

Correctly denote the Result symbol as "weak" if it was parsed as such.

pparautl.pas:
  * insert_funcret_para & insert_funcret_local: apply "vo_is_weakref" flag to the Result symbol if "retisweak" is set for the (abstract)procdef

git-svn-id: branches/svenbarth/arc@28806 -
svenbarth 11 years ago
parent
commit
d71f6a6ac3
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/pparautl.pas

+ 4 - 0
compiler/pparautl.pas

@@ -77,6 +77,8 @@ implementation
              paranr:=paranr_result;
            { Generate result variable accessing function result }
            vs:=cparavarsym.create('$result',paranr,vs_var,pd.returndef,[vo_is_funcret,vo_is_hidden_para]);
+           if pd.retisweak then
+             include(vs.varoptions,vo_is_weakref);
            pd.parast.insert(vs);
            { Store this symbol as funcretsym for procedures }
            if pd.typ=procdef then
@@ -258,6 +260,8 @@ implementation
                not paramanager.ret_in_param(pd.returndef,pd) then
             begin
               vs:=clocalvarsym.create('$result',vs_value,pd.returndef,[vo_is_funcret]);
+              if pd.retisweak then
+                include(vs.varoptions,vo_is_weakref);
               pd.localst.insert(vs);
               pd.funcretsym:=vs;
             end;