2
0
Эх сурвалжийг харах

* correctly add an extra [ to the type of call-by-reference parameters that
are translated into arrays by the compiler (for the debug information)

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

Jonas Maebe 14 жил өмнө
parent
commit
a3bd8cb0ba
1 өөрчлөгдсөн 6 нэмэгдсэн , 0 устгасан
  1. 6 0
      compiler/jvmdef.pas

+ 6 - 0
compiler/jvmdef.pas

@@ -523,6 +523,12 @@ implementation
                 result:='''result'' '+result
               else
                 begin
+                  { add array indirection if required }
+                  if (vsym.typ=paravarsym) and
+                     (vsym.vardef.typ=formaldef) or
+                     ((vsym.varspez in [vs_var,vs_out,vs_constref]) and
+                      not jvmimplicitpointertype(vsym.vardef)) then
+                    result:='['+result;
                   { single quotes for definitions to prevent clashes with Java
                     opcodes }
                   if withsignature then