Skip to content

Commit a1b4d09

Browse files
authored
Merge pull request #1630 from aschackmull/java/switchexpr-tostring
Java: Add toString override for SwitchExpr.
2 parents 8443f68 + e8aae19 commit a1b4d09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/ql/src/semmle/code/java/Expr.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,9 @@ class SwitchExpr extends Expr, @switchexpr {
11211121
break.(JumpStmt).getTarget() = this and result = break.getValue()
11221122
)
11231123
}
1124+
1125+
/** Gets a printable representation of this expression. */
1126+
override string toString() { result = "switch (...)" }
11241127
}
11251128

11261129
/** A parenthesised expression. */

0 commit comments

Comments
 (0)