Skip to content

Commit a354e77

Browse files
committed
document final type aliases
1 parent a639f13 commit a354e77

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ For example, to declare a module ``M`` as private, you could use:
1616
}
1717
1818
Note that some annotations act on an entity itself, whilst others act on a particular *name* for the entity:
19-
- Act on an **entity**: ``abstract``, ``cached``, ``external``, ``transient``, ``final``, ``override``, ``pragma``, ``language``,
19+
- Act on an **entity**: ``abstract``, ``cached``, ``external``, ``transient``, ``override``, ``pragma``, ``language``,
2020
and ``bindingset``
21-
- Act on a **name**: ``deprecated``, ``library``, ``private``, and ``query``
21+
- Act on a **name**: ``deprecated``, ``library``, ``private``, ``final``, and ``query``
2222

2323
For example, if you annotate an entity with ``private``, then only that particular name is
2424
private. You could still access that entity under a different name (using an :ref:`alias <aliases>`).
@@ -179,11 +179,11 @@ without ``external``, the compiler will report an error.
179179
``final``
180180
=========
181181

182-
**Available for**: |classes|, |member predicates|, |fields|
182+
**Available for**: |classes|, |type aliases|, |member predicates|, |fields|
183183

184-
The ``final`` annotation is applied to entities that can't be overridden or extended.
185-
In other words, a final class can't act as a base type for any other types, and a final
186-
predicate or field can't be overridden in a subclass.
184+
The ``final`` annotation is applied to names that can't be overridden or extended.
185+
In other words, a final class or a final type alias can't act as a base type for any other types,
186+
and a final predicate or field can't be overridden in a subclass.
187187

188188
This is useful if you don't want subclasses to change the meaning of a particular entity.
189189

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ The following table summarizes the syntactic constructs which can be marked with
692692
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
693693
| ``external`` | | | | yes | | | | |
694694
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
695-
| ``final`` | yes | | yes | | | yes | | |
695+
| ``final`` | yes | | yes | | | yes | | yes |
696696
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
697697
| ``transient`` | | | | yes | | | | |
698698
+----------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+

0 commit comments

Comments
 (0)