Closed
Description
Currently CodeQL's BreakStmt
, YieldStmt
and ContinueStmt
have no common superclass, and JumpStmt
is defined separately. This has the following disadvantages:
- It makes it difficult for users to discover
JumpStmt
because at least in the documentation there is no relation between for exampleBreakStmt
andJumpStmt
- The predicates for accessing the targeted element (a pretty common use case) are only defined for
JumpStmt
. This requires double casts to access these predicates, multiple of these can be seen in the CodeQL source code, e.g.exit.(BreakStmt).(JumpStmt).getTarget()
What do you think about making JumpStmt
a proper superclass of these classes? This would solve the aforementioned issues.