mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Use getAPattern
This commit is contained in:
@@ -559,9 +559,7 @@ class PatternCase extends SwitchCase {
|
||||
/**
|
||||
* Gets this case's sole pattern, if there is exactly one.
|
||||
*/
|
||||
PatternExpr getUniquePattern() {
|
||||
result = unique(PatternExpr pe | pe = this.getPatternAtIndex(_))
|
||||
}
|
||||
PatternExpr getUniquePattern() { result = unique(PatternExpr pe | pe = this.getAPattern()) }
|
||||
|
||||
/** Gets the guard applicable to this pattern case, if any. */
|
||||
Expr getGuard() { result.isNthChildOf(this, -3) }
|
||||
|
||||
Reference in New Issue
Block a user