This commit is contained in:
Chris Smowton 2024-03-22 15:57:20 +00:00
Родитель 403e86878c
Коммит ee36e3b72b
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -559,7 +559,9 @@ class PatternCase extends SwitchCase {
/** /**
* Gets this case's sole pattern, if there is exactly one. * 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.getPatternAtIndex(_))
}
/** Gets the guard applicable to this pattern case, if any. */ /** Gets the guard applicable to this pattern case, if any. */
Expr getGuard() { result.isNthChildOf(this, -3) } Expr getGuard() { result.isNthChildOf(this, -3) }