瀏覽代碼

* 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;
 {$else jvm}
       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}
       { generate the symbol for the access }
       sl:=tpropaccesslist.create;