Просмотр исходного кода

* insert symbol only once

git-svn-id: trunk@36620 -
svenbarth 8 лет назад
Родитель
Сommit
ad65ff5600
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      compiler/pdecvar.pas

+ 3 - 2
compiler/pdecvar.pas

@@ -1345,7 +1345,6 @@ implementation
                else
                  begin
                    vs.register_sym;
-                   symtablestack.top.insert(vs);
                    if isgeneric then
                      begin
                        { ensure correct error position }
@@ -1353,7 +1352,9 @@ implementation
                        current_filepos:=tmp_filepos;
                        symtablestack.top.insert(vs);
                        current_filepos:=old_current_filepos;
-                     end;
+                     end
+                   else
+                     symtablestack.top.insert(vs);
                  end;
              until not try_to_consume(_COMMA);