mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 10:15:19 +00:00
Replace val with native final var in Java >= 10
This commit is contained in:
1 parent
e050dafc90
commit
fdcbaa033d
36 files changed
+128
-16
No files matched your search
@@ -1,9 +1,9 @@
|
||||
// version 14:
|
||||
public class ValSwitchExpression {
|
||||
public void method(int arg) {
|
||||
final int x = switch (arg) {
|
||||
final var x = switch (arg) {
|
||||
default -> {
|
||||
final java.lang.String s = "string";
|
||||
final var s = "string";
|
||||
yield arg;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user