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 {
6565
6666 /**
6767 * Gets the body, if it exists.
68+ *
69+ * The body is absent within protocol declarations.
6870 */
6971 final BraceStmt getBody ( ) { result = getImmediateBody ( ) .resolve ( ) }
7072
Original file line number Diff line number Diff line change @@ -5,11 +5,14 @@ import codeql.swift.elements.type.AnyFunctionType
55import codeql.swift.elements.type.GenericTypeParamType
66
77module Generated {
8+ /**
9+ * The type of a generic function with type parameters
10+ */
811 class GenericFunctionType extends Synth:: TGenericFunctionType , AnyFunctionType {
912 override string getAPrimaryQlClass ( ) { result = "GenericFunctionType" }
1013
1114 /**
12- * Gets the `index`th generic param .
15+ * Gets the `index`th generic parameter .
1316 * This is taken from the "hidden" AST and should only be used to be overridden by classes.
1417 */
1518 GenericTypeParamType getImmediateGenericParam ( int index ) {
@@ -20,19 +23,19 @@ module Generated {
2023 }
2124
2225 /**
23- * Gets the `index`th generic param .
26+ * Gets the `index`th generic parameter .
2427 */
2528 final GenericTypeParamType getGenericParam ( int index ) {
2629 result = getImmediateGenericParam ( index ) .resolve ( )
2730 }
2831
2932 /**
30- * Gets any of the generic params .
33+ * Gets any of the generic parameters .
3134 */
3235 final GenericTypeParamType getAGenericParam ( ) { result = getGenericParam ( _) }
3336
3437 /**
35- * Gets the number of generic params .
38+ * Gets the number of generic parameters .
3639 */
3740 final int getNumberOfGenericParams ( ) { result = count ( getAGenericParam ( ) ) }
3841 }
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ class ParamDecl(VarDecl):
139139class Callable (Element ):
140140 self_param : optional [ParamDecl ] | child
141141 params : list [ParamDecl ] | child
142- body : optional ["BraceStmt" ] | child
142+ body : optional ["BraceStmt" ] | child | desc ( "The body is absent within protocol declarations." )
143143
144144class AbstractFunctionDecl (GenericContext , ValueDecl , Callable ):
145145 name : string
@@ -903,7 +903,8 @@ class FunctionType(AnyFunctionType):
903903 pass
904904
905905class 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" )
907908
908909class GenericTypeParamType (SubstitutableType ):
909910 pass
You can’t perform that action at this time.
0 commit comments