@@ -413,9 +413,7 @@ class SwitchStmt extends Stmt, @switchstmt {
413413 Expr getExpr ( ) { result .getParent ( ) = this }
414414
415415 /** Holds if this switch has a case handling a null literal. */
416- predicate hasNullCase ( ) {
417- this .getAConstCase ( ) .getValue ( _) instanceof NullLiteral
418- }
416+ predicate hasNullCase ( ) { this .getAConstCase ( ) .getValue ( _) instanceof NullLiteral }
419417
420418 override string pp ( ) { result = "switch (...)" }
421419
@@ -506,12 +504,10 @@ class SwitchCase extends Stmt, @case {
506504 */
507505class ConstCase extends SwitchCase {
508506 ConstCase ( ) {
509- exists ( Expr e |
510- e .getParent ( ) = this and e .getIndex ( ) >= 0 and not e instanceof Pattern
511- )
507+ exists ( Expr e | e .getParent ( ) = this and e .getIndex ( ) >= 0 and not e instanceof Pattern ) and
512508 // For backward compatibility, we don't include `case null, default:` here, on the assumption
513509 // this will come as a surprise to CodeQL that predates that statement's validity.
514- and not isNullDefaultCase ( this )
510+ not isNullDefaultCase ( this )
515511 }
516512
517513 /** Gets the `case` constant at index 0. */
@@ -543,13 +539,9 @@ class Pattern extends Expr {
543539 ( this instanceof LocalVariableDeclExpr or this instanceof RecordPatternExpr )
544540 }
545541
546- LocalVariableDeclExpr asBindingPattern ( ) {
547- result = this
548- }
542+ LocalVariableDeclExpr asBindingPattern ( ) { result = this }
549543
550- RecordPatternExpr asRecordPattern ( ) {
551- result = this
552- }
544+ RecordPatternExpr asRecordPattern ( ) { result = this }
553545}
554546
555547/** A pattern case of a `switch` statement */
0 commit comments