Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ void test(String s) {
};
sink(x4);
}

static String f(Object x) {
return switch (x) {
case null, default -> "v";
};
}
}
2 changes: 1 addition & 1 deletion java/ql/test/library-tests/dataflow/switchexpr/options
Original file line number Diff line number Diff line change
@@ -1 +1 @@
//semmle-extractor-options: --javac-args -source 14 -target 14
//semmle-extractor-options: --javac-args -source 21 -target 21
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
exprs
| TestSwitchExpr.java:9:13:9:41 | case ... | TestSwitchExpr.java:9:43:9:46 | null |
| TestSwitchExpr.java:10:13:10:22 | default | TestSwitchExpr.java:10:24:10:25 | x1 |
| TestSwitchExpr.java:28:13:28:33 | case null, default | TestSwitchExpr.java:28:35:28:37 | "v" |
| TestSwitchExprStmtConsistency.java:10:7:10:15 | case ... | TestSwitchExprStmtConsistency.java:10:17:10:19 | f(...) |
| TestSwitchExprStmtConsistency.java:11:7:11:15 | case ... | TestSwitchExprStmtConsistency.java:11:17:11:19 | f(...) |
| TestSwitchExprStmtConsistency.java:12:7:12:16 | default | TestSwitchExprStmtConsistency.java:12:18:12:20 | f(...) |
Expand Down
Loading