瀏覽代碼

* don't write local constants of procedures, because their names may clash
(the JVM doesn't have a concept of local constants, so they were made
global)

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

Jonas Maebe 14 年之前
父節點
當前提交
a6e196bfd6
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/agjasmin.pas

+ 3 - 1
compiler/agjasmin.pas

@@ -928,7 +928,9 @@ implementation
                end;
              constsym:
                begin
-                 WriteConstSym(tconstsym(sym));
+                 { multiple procedures can have constants with the same name }
+                 if tdef(sym.owner.defowner).typ<>procdef then
+                   WriteConstSym(tconstsym(sym));
                end;
              procsym:
                begin