mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Update docs/ql-design-patterns.md
Co-authored-by: Rasmus Wriedt Larsen <rasmuswl@github.com>
This commit is contained in:
@@ -60,7 +60,7 @@ The key element of the pattern is to provide a field of type `MySpecialExpr::Ran
|
||||
|
||||
</details>
|
||||
|
||||
Note, previously we used to write `MySpecialExpr() { this = self }`, but we now recommend using `MySpecialExpr() { this = range }` instead to avoid anyone mistakenly thinking that `self` and `this` are synonyms in general.
|
||||
Note that in some libraries, the `range` field is in fact called `self`. While we do recommend using `range` for consistency, the name of the field does not matter (and using `range` avoids confusion in contexts like Python analysis that has strong usage of `self`).
|
||||
|
||||
### Rationale
|
||||
|
||||
|
||||
Reference in New Issue
Block a user