Skip to content

Commit d38d4aa

Browse files
committed
try to be clearer about weak and strong aliases in the language reference
1 parent 29e4623 commit d38d4aa

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ You could give the predicate a more descriptive name as follows:
130130
Strong and weak aliases
131131
=======================
132132

133-
Every alias is either **strong** or **weak**.
134-
An alias is **strong** if and only if it is a :ref:`type alias <type-aliases>` with :ref:`annotation <annotations>`
135-
``final``.
136-
During :ref:`name resolution <name-resolution>`, ambiguity between **weak** aliases of the same target is allowed,
137-
but ambiguity between distinct **strong** aliases or entities is invalid QL.
138-
For the purpose of applicative instantiation of :ref:`parameterised modules <parameterized-modules>` and
139-
`:ref:`parameterised module signatures <parameterized-module-signatures>`, **weak** aliases of instantiation
140-
arguments are considered equivalent, but distinct **strong** aliases result in separate instantiations.
133+
Every alias definition is either **strong** or **weak**.
134+
An alias definition is **strong** if and only if it is a :ref:`type alias <type-aliases>` definition with
135+
:ref:`annotation <annotations>` ``final``.
136+
During :ref:`name resolution <name-resolution>`, ambiguity between aliases from **weak** alias definitions
137+
for the same module/type/predicate is allowed, but ambiguity between between aliases from distinct **strong**
138+
alias definitions is invalid QL.
139+
Likewise, for the purpose of applicative instantiation of :ref:`parameterised modules <parameterized-modules>`
140+
and `:ref:`parameterised module signatures <parameterized-module-signatures>`, aliases from **weak** alias
141+
definitions for instantiation arguments do not result in separate instantiations, but aliases from **strong**
142+
alias definitions for instantiation arguments do.

0 commit comments

Comments
 (0)