소스 검색

* use check_strict_private and check_strict_protected in their respective non-strict checks to avoid code duplication

Sven/Sarah Barth 1 년 전
부모
커밋
11200cfaf6
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      compiler/symtable.pas

+ 4 - 2
compiler/symtable.pas

@@ -3372,7 +3372,8 @@ implementation
             begin
               { private symbols are allowed when we are in the same
                 module as they are defined }
-              result:=(
+              result:=check_strict_private or
+                      (
                        (nonlocalst.symtabletype in [globalsymtable,staticsymtable]) and
                        is_current_unit(nonlocalst)
                       ) or
@@ -3417,7 +3418,8 @@ implementation
               { protected symbols are visible in the module that defines them and
                 also visible to related objects. The related object must be defined
                 in the current module }
-              result:=(
+              result:=check_strict_protected or
+                      (
                        (
                         (nonlocalst.symtabletype in [globalsymtable,staticsymtable]) and
                         is_current_unit(nonlocalst)