File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
ql/lib/codeql/swift/generated Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ module Generated {
65
65
66
66
/**
67
67
* Gets the body, if it exists.
68
+ *
69
+ * The body is absent within protocol declarations.
68
70
*/
69
71
final BraceStmt getBody ( ) { result = getImmediateBody ( ) .resolve ( ) }
70
72
Original file line number Diff line number Diff line change @@ -5,11 +5,14 @@ import codeql.swift.elements.type.AnyFunctionType
5
5
import codeql.swift.elements.type.GenericTypeParamType
6
6
7
7
module Generated {
8
+ /**
9
+ * The type of a generic function with type parameters
10
+ */
8
11
class GenericFunctionType extends Synth:: TGenericFunctionType , AnyFunctionType {
9
12
override string getAPrimaryQlClass ( ) { result = "GenericFunctionType" }
10
13
11
14
/**
12
- * Gets the `index`th generic param .
15
+ * Gets the `index`th generic parameter .
13
16
* This is taken from the "hidden" AST and should only be used to be overridden by classes.
14
17
*/
15
18
GenericTypeParamType getImmediateGenericParam ( int index ) {
@@ -20,19 +23,19 @@ module Generated {
20
23
}
21
24
22
25
/**
23
- * Gets the `index`th generic param .
26
+ * Gets the `index`th generic parameter .
24
27
*/
25
28
final GenericTypeParamType getGenericParam ( int index ) {
26
29
result = getImmediateGenericParam ( index ) .resolve ( )
27
30
}
28
31
29
32
/**
30
- * Gets any of the generic params .
33
+ * Gets any of the generic parameters .
31
34
*/
32
35
final GenericTypeParamType getAGenericParam ( ) { result = getGenericParam ( _) }
33
36
34
37
/**
35
- * Gets the number of generic params .
38
+ * Gets the number of generic parameters .
36
39
*/
37
40
final int getNumberOfGenericParams ( ) { result = count ( getAGenericParam ( ) ) }
38
41
}
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ class ParamDecl(VarDecl):
139
139
class Callable (Element ):
140
140
self_param : optional [ParamDecl ] | child
141
141
params : list [ParamDecl ] | child
142
- body : optional ["BraceStmt" ] | child
142
+ body : optional ["BraceStmt" ] | child | desc ( "The body is absent within protocol declarations." )
143
143
144
144
class AbstractFunctionDecl (GenericContext , ValueDecl , Callable ):
145
145
name : string
@@ -903,7 +903,8 @@ class FunctionType(AnyFunctionType):
903
903
pass
904
904
905
905
class GenericFunctionType (AnyFunctionType ):
906
- generic_params : list ["GenericTypeParamType" ]
906
+ """ The type of a generic function with type parameters """
907
+ generic_params : list ["GenericTypeParamType" ] | docname ("generic parameters" )
907
908
908
909
class GenericTypeParamType (SubstitutableType ):
909
910
pass
You can’t perform that action at this time.
0 commit comments