Jelajahi Sumber

* 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 tahun lalu
induk
melakukan
b0d777e16b
1 mengubah file dengan 2 tambahan dan 3 penghapusan
  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;