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

* fixed tbf/tb0063

git-svn-id: trunk@6271 -
Jonas Maebe 18 лет назад
Родитель
Сommit
0650ebe3f2
1 измененных файлов с 4 добавлено и 9 удалено
  1. 4 9
      compiler/symtable.pas

+ 4 - 9
compiler/symtable.pas

@@ -1025,10 +1025,6 @@ implementation
          if not assigned(defowner) then
          if not assigned(defowner) then
            internalerror(200602061);
            internalerror(200602061);
 
 
-         if (m_duplicate_names in current_settings.modeswitches) and
-            (sym.typ in [paravarsym,localvarsym]) then
-           exit;
-
          { check for duplicate field, parameter or local names
          { check for duplicate field, parameter or local names
            also in inherited classes }
            also in inherited classes }
          if (sym.typ in [fieldvarsym,paravarsym,localvarsym]) and
          if (sym.typ in [fieldvarsym,paravarsym,localvarsym]) and
@@ -1048,9 +1044,9 @@ implementation
            end
            end
          else
          else
            begin
            begin
-             result:=inherited checkduplicate(hashedid,sym);
-             if result then
-               exit;
+             if not(m_duplicate_names in current_settings.modeswitches) or
+                not(sym.typ in [paravarsym,localvarsym]) then
+               result:=inherited checkduplicate(hashedid,sym);
            end;
            end;
       end;
       end;
 
 
@@ -1156,8 +1152,7 @@ implementation
         { check ObjectSymtable, skip this for funcret sym because
         { check ObjectSymtable, skip this for funcret sym because
           that will always be positive because it has the same name
           that will always be positive because it has the same name
           as the procsym }
           as the procsym }
-        if not(m_duplicate_names in current_settings.modeswitches) and
-           not is_funcret_sym(sym) and
+        if not is_funcret_sym(sym) and
            (defowner.typ=procdef) and
            (defowner.typ=procdef) and
            assigned(tprocdef(defowner)._class) and
            assigned(tprocdef(defowner)._class) and
            (tprocdef(defowner).owner.defowner=tprocdef(defowner)._class) then
            (tprocdef(defowner).owner.defowner=tprocdef(defowner)._class) then