Skip to content

Commit bd3bcf9

Browse files
committed
language reference section on 'additional' annotation
1 parent 7893768 commit bd3bcf9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,20 @@ own body, or they must inherit from another class that overrides ``isSource``:
9797
// doesn't need to override `isSource`, because it inherits it from ConfigA
9898
}
9999
100+
.. index:: additional
101+
.. _additional:
102+
103+
``additional``
104+
==============
105+
106+
**Available for**: |classes|, |algebraic datatypes|, |type unions|, |non-member predicates|, |modules|, |aliases|, |signatures|
107+
108+
The ``additional`` annotation can be used on declarations directly inside of modules that implement |module signatures|.
109+
All declarations in such modules that are not required by a module signature must be annotated with ``additional``.
110+
111+
Omitting ``additional`` on such declarations, or using the annotation in any other context, will result in a compiler error.
112+
Other than that, the annotation has no effect.
113+
100114
.. index:: cached
101115
.. _cached:
102116

@@ -495,3 +509,4 @@ The ``bindingset`` annotation takes a comma-separated list of variables.
495509
.. |signatures| replace:: :ref:`signatures <signatures>`
496510
.. |predicate signatures| replace:: :ref:`predicate signatures <predicate-signatures>`
497511
.. |type signatures| replace:: :ref:`type signatures <type-signatures>`
512+
.. |module signatures| replace:: :ref:`module signatures <module-signatures>`

0 commit comments

Comments
 (0)