Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46f103c commit 7baefbbCopy full SHA for 7baefbb
1 file changed
java/ql/lib/semmle/code/java/Expr.qll
@@ -2201,6 +2201,11 @@ class WhenBranch extends Top, @whenbranch {
2201
/** Holds if this is an `else` branch. */
2202
predicate isElseBranch() { when_branch_else(this) }
2203
2204
+ /** Gets the `when` expression this is a branch of. */
2205
+ WhenExpr getWhenExpr() {
2206
+ this = result.getBranch(_)
2207
+ }
2208
+
2209
override string toString() { result = "... -> ..." }
2210
2211
override string getAPrimaryQlClass() { result = "WhenBranch" }
0 commit comments