mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
shadowing and visibility of default predicates
This commit is contained in:
@@ -223,7 +223,8 @@ For a module ``M``, it is useful to distinguish between its **privately declared
|
||||
- The **publically declared** namespaces of ``M`` contain all entities and aliases that are declared—that is, defined—in ``M`` and that are not annotated as ``private``.
|
||||
- The **exported** namespaces of ``M`` contain
|
||||
1. all entries from the **publically declared** namespaces of ``M``, and
|
||||
2. for each module ``N`` that is imported into ``M`` with an import statement that is not annotated as ``private``: all entries from the **exported** namespaces of ``N`` that do not have the same name as any of the entries in the **publically declared** namespaces of ``M``.
|
||||
2. for each module ``N`` that is imported into ``M`` with an import statement that is not annotated as ``private``: all entries from the **exported** namespaces of ``N`` that do not have the same name as any of the entries in the **publically declared** namespaces of ``M``, and
|
||||
3. for each module signature ``S`` that is implemented by ``M``: an entry for each module signature default predicate in ``S`` that does not have the same name and arity as any of the entries in the **publically declared** predicate namespace of ``M``.
|
||||
- The **visible** namespaces of ``M`` contain
|
||||
1. all entries from the **exported** namespaces of ``M``, and
|
||||
2. all entries from the **global** namespaces, and
|
||||
|
||||
@@ -144,7 +144,9 @@ These are defined as follows (with X denoting the type of entity we are currentl
|
||||
|
||||
1. its *publically declared X environment*, and
|
||||
|
||||
2. for each module which the current module directly imports (excluding ``private`` imports - see "`Import directives <#import-directives>`__"): all entries from the *exported X environment* that have a key not present in the *publically declared X environment* of the current module.
|
||||
2. for each module which the current module directly imports (excluding ``private`` imports - see "`Import directives <#import-directives>`__"): all entries from the *exported X environment* that have a key not present in the *publically declared X environment* of the current module, and
|
||||
|
||||
3. if X is ``predicates``, then for each module signature ``S`` that is implemented by the current module: an entry for each module signature default predicate in ``S`` that does not have the same name and arity as any of the entries in the **publically declared predicate environment** of the current module.
|
||||
|
||||
- The *visible X environment* of a module is the union of
|
||||
|
||||
|
||||
Reference in New Issue
Block a user