Explorar o código

* fixed (harmless) invalid typecasts that caused run time errors with -CR

git-svn-id: branches/jvmbackend@19824 -
Jonas Maebe %!s(int64=13) %!d(string=hai) anos
pai
achega
c61e9a2f04
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      compiler/jvm/njvmld.pas

+ 2 - 2
compiler/jvm/njvmld.pas

@@ -197,8 +197,8 @@ function tjvmloadnode.handle_threadvar_access: tnode;
     result:=cloadnode.create(vs,vs.owner);
     result:=cloadnode.create(vs,vs.owner);
     typecheckpass(result);
     typecheckpass(result);
     result:=ccallnode.createinternmethod(result,'GETREADWRITEREFERENCE',nil);
     result:=ccallnode.createinternmethod(result,'GETREADWRITEREFERENCE',nil);
-    if not(tparavarsym(symtableentry).vardef.typ in [orddef,floatdef]) and
-       not jvmimplicitpointertype(tparavarsym(symtableentry).vardef) then
+    if not(tstaticvarsym(symtableentry).vardef.typ in [orddef,floatdef]) and
+       not jvmimplicitpointertype(tstaticvarsym(symtableentry).vardef) then
       begin
       begin
         { in these cases, the threadvar was internally constructed as an
         { in these cases, the threadvar was internally constructed as an
           "array of jlobject", while the variable itself is a different kind of
           "array of jlobject", while the variable itself is a different kind of