diff options
author | Roel Spilker <r.spilker@gmail.com> | 2014-05-01 00:03:01 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2014-05-01 00:06:22 +0200 |
commit | fd1a9d7c0994ec93881e2986844856b781a22c6d (patch) | |
tree | ad2b4d6c86a54026d370a88685db2b575c837867 /test/pretty/resource | |
parent | 415fa0d8db53ef92420539ba44a134575e73d9d4 (diff) | |
download | lombok-fd1a9d7c0994ec93881e2986844856b781a22c6d.tar.gz lombok-fd1a9d7c0994ec93881e2986844856b781a22c6d.tar.bz2 lombok-fd1a9d7c0994ec93881e2986844856b781a22c6d.zip |
[java8] Support in delombok for intersection typecast and lambdas
Diffstat (limited to 'test/pretty/resource')
-rw-r--r-- | test/pretty/resource/after/CastWithIntersection.java | 6 | ||||
-rw-r--r-- | test/pretty/resource/after/Lambda.java | 7 | ||||
-rw-r--r-- | test/pretty/resource/after/MultiCatch.java | 9 | ||||
-rw-r--r-- | test/pretty/resource/before/CastWithIntersection.java | 7 | ||||
-rw-r--r-- | test/pretty/resource/before/Lambda.java | 8 | ||||
-rw-r--r-- | test/pretty/resource/before/MultiCatch.java | 10 |
6 files changed, 47 insertions, 0 deletions
diff --git a/test/pretty/resource/after/CastWithIntersection.java b/test/pretty/resource/after/CastWithIntersection.java new file mode 100644 index 00000000..2eebdee1 --- /dev/null +++ b/test/pretty/resource/after/CastWithIntersection.java @@ -0,0 +1,6 @@ +import java.util.*; +public class CastWithIntersection { + public void test(List<?> list) { + RandomAccess r = (RandomAccess & java.io.Serializable)list; + } +}
\ No newline at end of file diff --git a/test/pretty/resource/after/Lambda.java b/test/pretty/resource/after/Lambda.java new file mode 100644 index 00000000..54d7caa0 --- /dev/null +++ b/test/pretty/resource/after/Lambda.java @@ -0,0 +1,7 @@ +public class Lambda { + Runnable r = () -> System.out.println(); + java.util.Comparator<Integer> c1 = (a, b) -> a - b; + java.util.Comparator<Integer> c2 = (Integer a, Integer b) -> { + return a - b; + }; +}
\ No newline at end of file diff --git a/test/pretty/resource/after/MultiCatch.java b/test/pretty/resource/after/MultiCatch.java new file mode 100644 index 00000000..f0414c2e --- /dev/null +++ b/test/pretty/resource/after/MultiCatch.java @@ -0,0 +1,9 @@ +public class MultiCatch { + public void test() { + try { + System.out.println(); + } catch (IllegalArgumentException | IllegalStateException e) { + e.printStackTrace(); + } + } +}
\ No newline at end of file diff --git a/test/pretty/resource/before/CastWithIntersection.java b/test/pretty/resource/before/CastWithIntersection.java new file mode 100644 index 00000000..ce97cba0 --- /dev/null +++ b/test/pretty/resource/before/CastWithIntersection.java @@ -0,0 +1,7 @@ +// version 8: +import java.util.*; +public class CastWithIntersection { + public void test(List<?> list) { + RandomAccess r = (RandomAccess & java.io.Serializable) list; + } +}
\ No newline at end of file diff --git a/test/pretty/resource/before/Lambda.java b/test/pretty/resource/before/Lambda.java new file mode 100644 index 00000000..e7784df5 --- /dev/null +++ b/test/pretty/resource/before/Lambda.java @@ -0,0 +1,8 @@ +// version 8: +public class Lambda { + Runnable r = () -> System.out.println(); + java.util.Comparator<Integer> c1 = (a, b) -> a - b; + java.util.Comparator<Integer> c2 = (Integer a, Integer b) -> { + return a - b; + }; +}
\ No newline at end of file diff --git a/test/pretty/resource/before/MultiCatch.java b/test/pretty/resource/before/MultiCatch.java new file mode 100644 index 00000000..590fe382 --- /dev/null +++ b/test/pretty/resource/before/MultiCatch.java @@ -0,0 +1,10 @@ +// version 7: +public class MultiCatch { + public void test() { + try { + System.out.println(); + } catch (IllegalArgumentException | IllegalStateException e) { + e.printStackTrace(); + } + } +}
\ No newline at end of file |