You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/codeql/ql-language-reference/signatures.rst
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,11 @@ Type signatures
40
40
===============
41
41
42
42
Type signatures declare module parameters that will be substituted with types when the module is instantiated.
43
-
Type signatures are used to specify supertypes and are the simplest category of signatures.
43
+
Type signatures may specify supertypes and required member predicates (in addition to those member predicates that are
44
+
implied by the supertypes).
44
45
45
46
The substitution of type signatures relies on structural typing. That is, types do not have to be explicitly defined as
46
-
implementing a type signature - they just need to have the specified (transitive) supertypes.
47
+
implementing a type signature - they just need to have the specified (transitive) supertypes and member predicates.
47
48
48
49
In detail, a type signature definition consists of:
49
50
@@ -52,14 +53,19 @@ In detail, a type signature definition consists of:
52
53
#. The name of the type signature. This is an `identifier <https://codeql.github.com/docs/ql-language-reference/ql-language-specification/#identifiers>`_
53
54
starting with a uppercase letter.
54
55
#. Optionally, the keyword ``extends`` followed by a list of types, separated by commas.
55
-
#. A semicolon ``;``.
56
+
#. Either a semicolon ``;`` or a list of predicate signatures enclosed in braces.
57
+
The ``signature`` keyword is omitted for these contained signatures.
0 commit comments