aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/VarInFor.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/before/VarInFor.java')
-rw-r--r--test/transform/resource/before/VarInFor.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/transform/resource/before/VarInFor.java b/test/transform/resource/before/VarInFor.java
new file mode 100644
index 00000000..cc8c387e
--- /dev/null
+++ b/test/transform/resource/before/VarInFor.java
@@ -0,0 +1,12 @@
+//CONF: lombok.var.flagUsage = ALLOW
+import lombok.experimental.var;
+
+public class VarInFor {
+ public void enhancedFor() {
+ int[] list = new int[] {1, 2};
+ for (var shouldBeInt : list) {
+ System.out.println(shouldBeInt);
+ var shouldBeInt2 = shouldBeInt;
+ }
+ }
+} \ No newline at end of file