Browse Source

* 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 years ago
parent
commit
b0d777e16b
1 changed files with 2 additions and 3 deletions
  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;