Răsfoiți Sursa

* keep dynamic array -> open array type conversion nodes for the JVM target,
so that the result type of random dynamic array expressions doesn't suddenly
get changed into open array (causes internalerror if the size is requested),
and instead simply change the conversion type to tc_equal

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

Jonas Maebe 14 ani în urmă
părinte
comite
b0d777e16b
1 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 3
      compiler/jvm/njvmcnv.pas

+ 2 - 3
compiler/jvm/njvmcnv.pas

@@ -136,9 +136,8 @@ implementation
    function tjvmtypeconvnode.typecheck_dynarray_to_openarray: tnode;
      begin
        { all arrays are equal in Java }
-       left.resultdef:=resultdef;
-       result:=left;
-       left:=nil;
+       result:=nil;
+       convtype:=tc_equal;
      end;