Python: Prevent magic/inlining in getCase

This is a simplified version of
https://github.com/github/codeql/pull/8028
consisting of just the `nomagic` fix.
This commit is contained in:
Taus
2022-02-25 14:32:59 +00:00
committed by GitHub
parent 844815a032
commit 622b32692b

View File

@@ -10,6 +10,7 @@ class Pattern extends Pattern_, AstNode {
override Scope getScope() { result = this.getCase().getScope() }
/** Gets the case statement containing this pattern */
pragma[nomagic]
Case getCase() { result.contains(this) }
override string toString() { result = "Pattern" }