소스 검색

* when creating the static field of a generic, insert it into the generic instead of the global symtable as it isn't really used anyway

git-svn-id: trunk@43542 -
svenbarth 5 년 전
부모
커밋
a041f899d3
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      compiler/symcreat.pas

+ 4 - 1
compiler/symcreat.pas

@@ -1394,7 +1394,10 @@ implementation
       hstaticvs.visibility:=fieldvs.visibility;
       hstaticvs.visibility:=fieldvs.visibility;
 {$else jvm}
 {$else jvm}
       include(hstaticvs.symoptions,sp_internal);
       include(hstaticvs.symoptions,sp_internal);
-      tabstractrecordsymtable(recst).get_unit_symtable.insert(hstaticvs);
+      if df_generic in tdef(recst.defowner).defoptions then
+        tabstractrecordsymtable(recst).insert(hstaticvs)
+      else
+        tabstractrecordsymtable(recst).get_unit_symtable.insert(hstaticvs);
 {$endif jvm}
 {$endif jvm}
       { generate the symbol for the access }
       { generate the symbol for the access }
       sl:=tpropaccesslist.create;
       sl:=tpropaccesslist.create;