Browse Source

compiler: mark 'var' and 'out' arguments as they are passed by reference for dispatch invoke

git-svn-id: trunk@14781 -
paul 15 years ago
parent
commit
7aede2018f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/ncal.pas

+ 1 - 1
compiler/ncal.pas

@@ -410,7 +410,7 @@ implementation
                   internalerror(200611041);
                   internalerror(200611041);
               end;
               end;
 
 
-            dispatchbyref:=para.left.resultdef.typ in [variantdef];
+            dispatchbyref:=(para.parasym.varspez in [vs_var,vs_out]) or (para.left.resultdef.typ in [variantdef]);
 
 
             { assign the argument/parameter to the temporary location }
             { assign the argument/parameter to the temporary location }