Browse Source

* 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 years ago
parent
commit
a6e196bfd6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/agjasmin.pas

+ 3 - 1
compiler/agjasmin.pas

@@ -928,7 +928,9 @@ implementation
                end;
                end;
              constsym:
              constsym:
                begin
                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;
                end;
              procsym:
              procsym:
                begin
                begin