mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Swift: Make implicit this receivers explicit
This commit is contained in:
@@ -50,9 +50,9 @@ module Generated {
|
||||
* transitively.
|
||||
*/
|
||||
final {{name}} resolve() {
|
||||
not exists(getResolveStep()) and result = this
|
||||
not exists(this.getResolveStep()) and result = this
|
||||
or
|
||||
result = getResolveStep().resolve()
|
||||
result = this.getResolveStep().resolve()
|
||||
}
|
||||
{{/root}}
|
||||
{{#final}}
|
||||
@@ -84,7 +84,7 @@ module Generated {
|
||||
{{/has_description}}
|
||||
*/
|
||||
final {{type}} {{getter}}({{#is_indexed}}int index{{/is_indexed}}) {
|
||||
result = get{{#is_unordered}}An{{/is_unordered}}Immediate{{singular}}({{#is_indexed}}index{{/is_indexed}}).resolve()
|
||||
result = this.get{{#is_unordered}}An{{/is_unordered}}Immediate{{singular}}({{#is_indexed}}index{{/is_indexed}}).resolve()
|
||||
}
|
||||
|
||||
{{/type_is_class}}
|
||||
@@ -112,7 +112,7 @@ module Generated {
|
||||
* Holds if `{{getter}}({{#is_repeated}}index{{/is_repeated}})` exists.
|
||||
*/
|
||||
final predicate has{{singular}}({{#is_repeated}}int index{{/is_repeated}}) {
|
||||
exists({{getter}}({{#is_repeated}}index{{/is_repeated}}))
|
||||
exists(this.{{getter}}({{#is_repeated}}index{{/is_repeated}}))
|
||||
}
|
||||
{{/is_optional}}
|
||||
{{#is_indexed}}
|
||||
@@ -121,7 +121,7 @@ module Generated {
|
||||
* Gets any of the {{doc_plural}}.
|
||||
*/
|
||||
final {{type}} {{indefinite_getter}}() {
|
||||
result = {{getter}}(_)
|
||||
result = this.{{getter}}(_)
|
||||
}
|
||||
{{^is_optional}}
|
||||
|
||||
@@ -129,7 +129,7 @@ module Generated {
|
||||
* Gets the number of {{doc_plural}}.
|
||||
*/
|
||||
final int getNumberOf{{plural}}() {
|
||||
result = count(int i | exists({{getter}}(i)))
|
||||
result = count(int i | exists(this.{{getter}}(i)))
|
||||
}
|
||||
{{/is_optional}}
|
||||
{{/is_indexed}}
|
||||
@@ -138,7 +138,7 @@ module Generated {
|
||||
* Gets the number of {{doc_plural}}.
|
||||
*/
|
||||
final int getNumberOf{{plural}}() {
|
||||
result = count({{getter}}())
|
||||
result = count(this.{{getter}}())
|
||||
}
|
||||
{{/is_unordered}}
|
||||
{{/properties}}
|
||||
|
||||
Reference in New Issue
Block a user