mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 04:16:19 +00:00
[fixes #2624] Resolve variables in switch expressions
This commit is contained in:
1 parent
5120abe474
commit
400e0f7544
4 files changed
+52
-6
No files matched your search
@@ -0,0 +1,16 @@
|
||||
// version 14:
|
||||
import lombok.val;
|
||||
public class ValSwitchExpression {
|
||||
public ValSwitchExpression() {
|
||||
super();
|
||||
}
|
||||
public void method(int arg) {
|
||||
final @val int x = switch (arg) {
|
||||
default ->
|
||||
{
|
||||
final @val java.lang.String s = "string";
|
||||
yield arg;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user