diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2021-02-02 09:44:36 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2021-09-06 11:58:05 +0200 |
commit | fdcbaa033d27b344adfea99d8d7bdd99cceacfb3 (patch) | |
tree | 5f385d9d193bd66ac7b5036f0f1b63fce4405cfe /test/transform/resource/after-delombok/ValToNative.java | |
parent | e050dafc9016519e79184e383eab9ffbd579bebd (diff) | |
download | lombok-fdcbaa033d27b344adfea99d8d7bdd99cceacfb3.tar.gz lombok-fdcbaa033d27b344adfea99d8d7bdd99cceacfb3.tar.bz2 lombok-fdcbaa033d27b344adfea99d8d7bdd99cceacfb3.zip |
Replace val with native final var in Java >= 10
Diffstat (limited to 'test/transform/resource/after-delombok/ValToNative.java')
-rw-r--r-- | test/transform/resource/after-delombok/ValToNative.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValToNative.java b/test/transform/resource/after-delombok/ValToNative.java new file mode 100644 index 00000000..64aff9e5 --- /dev/null +++ b/test/transform/resource/after-delombok/ValToNative.java @@ -0,0 +1,15 @@ +// version 10: +import java.io.IOException; +import java.util.Arrays; + +public class ValToNative { + private void test() throws IOException { + final var intField = 1; + for (final var s : Arrays.asList("1")) { + final var s2 = s; + } + try (var in = getClass().getResourceAsStream("ValToNative.class")) { + final var j = in.read(); + } + } +}
\ No newline at end of file |