aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/ValSwitchExpression.java4
-rw-r--r--test/transform/resource/after-ecj/ValToNative.java19
2 files changed, 21 insertions, 2 deletions
diff --git a/test/transform/resource/after-ecj/ValSwitchExpression.java b/test/transform/resource/after-ecj/ValSwitchExpression.java
index 59b503cb..4e848572 100644
--- a/test/transform/resource/after-ecj/ValSwitchExpression.java
+++ b/test/transform/resource/after-ecj/ValSwitchExpression.java
@@ -5,10 +5,10 @@ public class ValSwitchExpression {
super();
}
public void method(int arg) {
- final @val int x = switch (arg) {
+ final @val var x = switch (arg) {
default ->
{
- final @val java.lang.String s = "string";
+ final @val var s = "string";
yield arg;
}
};
diff --git a/test/transform/resource/after-ecj/ValToNative.java b/test/transform/resource/after-ecj/ValToNative.java
new file mode 100644
index 00000000..2c8d721c
--- /dev/null
+++ b/test/transform/resource/after-ecj/ValToNative.java
@@ -0,0 +1,19 @@
+import java.io.IOException;
+import java.util.Arrays;
+import lombok.val;
+public class ValToNative {
+ public ValToNative() {
+ super();
+ }
+ private void test() throws IOException {
+ final @val var intField = 1;
+ for (final @val var s : Arrays.asList("1"))
+ {
+ final @val var s2 = s;
+ }
+ try (final @val var in = getClass().getResourceAsStream("ValToNative.class"))
+ {
+ final @val var j = in.read();
+ }
+ }
+} \ No newline at end of file