Skip to content

Commit e552a62

Browse files
committed
shadowing and visibility of default predicates
1 parent 09fdf74 commit e552a62

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/codeql/ql-language-reference/name-resolution.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ For a module ``M``, it is useful to distinguish between its **privately declared
223223
- 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``.
224224
- The **exported** namespaces of ``M`` contain
225225
1. all entries from the **publically declared** namespaces of ``M``, and
226-
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``.
226+
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
227+
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``.
227228
- The **visible** namespaces of ``M`` contain
228229
1. all entries from the **exported** namespaces of ``M``, and
229230
2. all entries from the **global** namespaces, and

docs/codeql/ql-language-reference/ql-language-specification.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ These are defined as follows (with X denoting the type of entity we are currentl
144144

145145
1. its *publically declared X environment*, and
146146

147-
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.
147+
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
148+
149+
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.
148150

149151
- The *visible X environment* of a module is the union of
150152

0 commit comments

Comments
 (0)