Browse Source

* fixed checkcast operations for unicodestrings: replace the definition
with java_jlstring in that case, because we have to insert the type
without L prefix and ; suffix for that opcode (which is not done for
objectdefs/recorddefs)

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

Jonas Maebe 14 years ago
parent
commit
4298992619
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/jvm/njvmcnv.pas

+ 3 - 0
compiler/jvm/njvmcnv.pas

@@ -797,6 +797,9 @@ implementation
         checkdef:=tclassrefdef(node.right.resultdef).pointeddef
       else
         checkdef:=node.right.resultdef;
+      { replace special types with their equivalent class type }
+      if is_wide_or_unicode_string(checkdef) then
+        checkdef:=java_jlstring;
       if checkdef.typ in [objectdef,recorddef] then
         current_asmdata.CurrAsmList.concat(taicpu.op_sym(opcode,current_asmdata.RefAsmSymbol(tabstractrecorddef(checkdef).jvm_full_typename(true))))
       else