浏览代码

* fixed fully qualified class names passed to JLClass.forName()
(components must be separated by '.', not '/')

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

Jonas Maebe 14 年之前
父节点
当前提交
687e9fb6dc
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/jvm/njvmcnv.pas

+ 2 - 1
compiler/jvm/njvmcnv.pas

@@ -92,7 +92,7 @@ interface
 implementation
 
    uses
-      verbose,globals,globtype,constexp,
+      verbose,globals,globtype,constexp,cutils,
       symbase,symconst,symdef,symsym,symtable,aasmbase,aasmdata,
       defutil,defcmp,jvmdef,
       cgbase,cgutils,pass_1,pass_2,
@@ -413,6 +413,7 @@ implementation
                  encodedtype:=jvmencodetype(pvs.vardef,false);
                  if pushaddr then
                    encodedtype:='['+encodedtype;
+                 replace(encodedtype,'/','.');
                  newpara:=ccallnode.createinternmethod(cloadvmtaddrnode.create(ctypenode.create(jlclass)),'FORNAME',
                    ccallparanode.create(cstringconstnode.createstr(encodedtype),nil));
                end