瀏覽代碼

* call getbasedef before getting the classdef of an enum (only the basedef
has an associated class)

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

Jonas Maebe 13 年之前
父節點
當前提交
622eb4b782
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/jvm/njvmmem.pas

+ 1 - 1
compiler/jvm/njvmmem.pas

@@ -409,7 +409,7 @@ implementation
           begin
           begin
            if (right.location.loc<>LOC_CONSTANT) then
            if (right.location.loc<>LOC_CONSTANT) then
              begin
              begin
-               psym:=search_struct_member(tenumdef(right.resultdef).classdef,'FPCORDINAL');
+               psym:=search_struct_member(tenumdef(right.resultdef).getbasedef.classdef,'FPCORDINAL');
                if not assigned(psym) or
                if not assigned(psym) or
                   (psym.typ<>procsym) or
                   (psym.typ<>procsym) or
                   (tprocsym(psym).ProcdefList.count<>1) then
                   (tprocsym(psym).ProcdefList.count<>1) then