mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 02:16:18 +00:00
[java8] Added tests for using java language features in transformations.
This commit is contained in:
1 parent
8bfed5d51c
commit
22c5e0daaf
6 files changed
+84
No files matched your search
@@ -0,0 +1,20 @@
|
||||
// version 8:
|
||||
class ValLambda {
|
||||
public void easyLambda() {
|
||||
lombok.val foo = (Runnable)()-> {};
|
||||
}
|
||||
|
||||
public void easyIntersectionLambda() {
|
||||
lombok.val foo = (Runnable & java.io.Serializable)()-> {};
|
||||
lombok.val bar = (java.io.Serializable & Runnable)()-> {};
|
||||
}
|
||||
|
||||
public void easyLubLambda() {
|
||||
lombok.val foo = (System.currentTimeMillis() > 0) ? (Runnable)()-> {} : (Runnable)System.out::println;
|
||||
}
|
||||
|
||||
// public void castLubLambda() {
|
||||
// Runnable foo = (Runnable)((System.currentTimeMillis() > 0) ? ()-> {} : System.out::println);
|
||||
// lombok.val foo = (Runnable)((System.currentTimeMillis() > 0) ? ()-> {} : System.out::println);
|
||||
// }
|
||||
}
|
||||
Reference in new issue
Block a user