@@ -16,9 +16,9 @@ For example, to declare a module ``M`` as private, you could use:
16
16
}
17
17
18
18
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 ``,
20
20
and ``bindingset ``
21
- - Act on a **name **: ``deprecated ``, ``library ``, ``private ``, and ``query ``
21
+ - Act on a **name **: ``deprecated ``, ``library ``, ``private ``, `` final ``, and ``query ``
22
22
23
23
For example, if you annotate an entity with ``private ``, then only that particular name is
24
24
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.
179
179
``final ``
180
180
=========
181
181
182
- **Available for **: |classes |, |member predicates |, |fields |
182
+ **Available for **: |classes |, |type-aliases |, | member predicates |, |fields |
183
183
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.
187
187
188
188
This is useful if you don't want subclasses to change the meaning of a particular entity.
189
189
@@ -453,5 +453,6 @@ The ``bindingset`` annotation takes a comma-separated list of variables.
453
453
.. |fields | replace :: :ref: `fields <fields >`
454
454
.. |modules | replace :: :ref: `modules <modules >`
455
455
.. |aliases | replace :: :ref: `aliases <aliases >`
456
+ .. |type-aliases | replace :: :ref: `type aliases <type-aliases >`
456
457
.. |algebraic datatypes | replace :: :ref: `algebraic datatypes <algebraic-datatypes >`
457
458
.. |expressions | replace :: :ref: `expressions <expressions >`
0 commit comments