Cfg: Update fallsThrough default.

This commit is contained in:
Anders Schack-Mulligen
2026-03-10 11:10:24 +01:00
parent edf88b34da
commit 77d4f5a2dc
2 changed files with 1 additions and 3 deletions

View File

@@ -165,8 +165,6 @@ private module Ast implements AstSig<Location> {
class DefaultCase extends Case instanceof J::DefaultCase { }
predicate fallsThrough(Case c) { not c.(J::SwitchCase).isRule() }
class ConditionalExpr = J::ConditionalExpr;
class BinaryExpr = J::BinaryExpr;

View File

@@ -261,7 +261,7 @@ signature module AstSig<LocationSig Location> {
* Holds if this case can fall through to the next case if it is not
* otherwise prevented with a `break` or similar.
*/
default predicate fallsThrough(Case c) { none() }
default predicate fallsThrough(Case c) { not exists(c.getBody()) }
/** A ternary conditional expression. */
class ConditionalExpr extends Expr {