aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/transform/resource/after-delombok/ValLessSimple.java7
-rw-r--r--test/transform/resource/before/ValLessSimple.java8
2 files changed, 15 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValLessSimple.java b/test/transform/resource/after-delombok/ValLessSimple.java
index 678b419e..d06c66ec 100644
--- a/test/transform/resource/after-delombok/ValLessSimple.java
+++ b/test/transform/resource/after-delombok/ValLessSimple.java
@@ -22,5 +22,12 @@ public class ValLessSimple {
final java.lang.String foo = fieldV + methodV;
}
}
+ private void testValInCatchBlock() {
+ try {
+ final int x = 1 / 0;
+ } catch (ArithmeticException e) {
+ final int y = 0;
+ }
+ }
private String field = "field";
} \ No newline at end of file
diff --git a/test/transform/resource/before/ValLessSimple.java b/test/transform/resource/before/ValLessSimple.java
index 31f8030d..b81cc22c 100644
--- a/test/transform/resource/before/ValLessSimple.java
+++ b/test/transform/resource/before/ValLessSimple.java
@@ -29,5 +29,13 @@ public class ValLessSimple {
}
}
+ private void testValInCatchBlock() {
+ try {
+ val x = 1 / 0;
+ } catch (ArithmeticException e) {
+ val y = 0;
+ }
+ }
+
private String field = "field";
}