mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-08 02:20:00 +00:00
[fixes #2624] Resolve variables in switch expressions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user