Simplify getCaseIndex

This commit is contained in:
Chris Smowton
2023-11-21 16:54:46 +00:00
parent bbc0f29f16
commit 5511955b60

View File

@@ -461,7 +461,7 @@ class SwitchCase extends Stmt, @case {
* Gets this case's ordinal in its switch block.
*/
int getCaseIndex() {
this = this.getSwitch().getCase(result) or this = this.getSwitchExpr().getCase(result)
this = any(SwitchStmt ss).getCase(result) or this = any(SwitchExpr se).getCase(result)
}
/**