Skip to content

Commit 67c4320

Browse files
committed
make JumpStmt non abstract
1 parent 016bdc1 commit 67c4320

File tree

1 file changed

+6
-2
lines changed
  • javascript/ql/src/semmle/javascript

1 file changed

+6
-2
lines changed

javascript/ql/src/semmle/javascript/Stmt.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@ class LabeledStmt extends @labeledstmt, Stmt {
457457
Stmt getStmt() { result = getChildStmt(1) }
458458
}
459459

460+
private class TJumpStmt = TBreakOrContinueStmt or @returnstmt or @throwstmt;
461+
462+
private class TBreakOrContinueStmt = @breakstmt or @continuestmt;
463+
460464
/**
461465
* A statement that disrupts structured control flow, that is, a `continue` statement,
462466
* a `break` statement, a `throw` statement, or a `return` statement.
@@ -470,7 +474,7 @@ class LabeledStmt extends @labeledstmt, Stmt {
470474
* return -1;
471475
* ```
472476
*/
473-
abstract class JumpStmt extends Stmt {
477+
class JumpStmt extends TJumpStmt, Stmt {
474478
/**
475479
* Gets the target of this jump.
476480
*
@@ -497,7 +501,7 @@ abstract class JumpStmt extends Stmt {
497501
* break;
498502
* ```
499503
*/
500-
abstract class BreakOrContinueStmt extends JumpStmt {
504+
class BreakOrContinueStmt extends TBreakOrContinueStmt, JumpStmt {
501505
/** Gets the label this statement refers to, if any. */
502506
string getTargetLabel() { result = getChildExpr(0).(Identifier).getName() }
503507

0 commit comments

Comments
 (0)