aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/ValSwitchExpression.java
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2021-04-22 07:53:25 +0200
committerRawi01 <Rawi01@users.noreply.github.com>2021-04-22 07:53:25 +0200
commit400e0f75441d4027c8ccdc5f18c1b06f7bc479d9 (patch)
tree84fcac49fa8c5fe09def89683333206dd67c7211 /test/transform/resource/before/ValSwitchExpression.java
parent5120abe4741c78d19d7e65404f407cfe57074a47 (diff)
downloadlombok-400e0f75441d4027c8ccdc5f18c1b06f7bc479d9.tar.gz
lombok-400e0f75441d4027c8ccdc5f18c1b06f7bc479d9.tar.bz2
lombok-400e0f75441d4027c8ccdc5f18c1b06f7bc479d9.zip
[fixes #2624] Resolve variables in switch expressions
Diffstat (limited to 'test/transform/resource/before/ValSwitchExpression.java')
-rw-r--r--test/transform/resource/before/ValSwitchExpression.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/transform/resource/before/ValSwitchExpression.java b/test/transform/resource/before/ValSwitchExpression.java
new file mode 100644
index 00000000..c3838acc
--- /dev/null
+++ b/test/transform/resource/before/ValSwitchExpression.java
@@ -0,0 +1,13 @@
+// version 14:
+import lombok.val;
+
+public class ValSwitchExpression {
+ public void method(int arg) {
+ val x = switch (arg) {
+ default -> {
+ val s = "string";
+ yield arg;
+ }
+ };
+ }
+}