aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/ValInLambda.java13
-rw-r--r--test/transform/resource/after-delombok/ValLambda.java12
2 files changed, 23 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/ValInLambda.java b/test/transform/resource/after-delombok/ValInLambda.java
index 7ce1e1b4..861fb9da 100644
--- a/test/transform/resource/after-delombok/ValInLambda.java
+++ b/test/transform/resource/after-delombok/ValInLambda.java
@@ -2,17 +2,26 @@
class ValInLambda {
Runnable foo = (Runnable) () -> {
final int i = 1;
+ final java.lang.Runnable foo = (System.currentTimeMillis() > 0) ? (Runnable) () -> {
+ } : System.out::println;
};
-
+
public void easyLambda() {
Runnable foo = (Runnable) () -> {
final int i = 1;
};
}
-
+
public void easyIntersectionLambda() {
Runnable foo = (Runnable) () -> {
final int i = 1;
};
}
+
+ public void easyLubLambda() {
+ Runnable foo = (Runnable) () -> {
+ final java.lang.Runnable fooInner = (System.currentTimeMillis() > 0) ? (Runnable) () -> {
+ } : System.out::println;
+ };
+ }
}
diff --git a/test/transform/resource/after-delombok/ValLambda.java b/test/transform/resource/after-delombok/ValLambda.java
index b993028e..82b8ecc5 100644
--- a/test/transform/resource/after-delombok/ValLambda.java
+++ b/test/transform/resource/after-delombok/ValLambda.java
@@ -1,15 +1,27 @@
// version 8:
class ValLambda {
+ static {
+ final java.lang.Runnable foo = (System.currentTimeMillis() > 0) ? (Runnable) () -> {
+ } : System.out::println;
+ }
+
+ {
+ final java.lang.Runnable foo = (System.currentTimeMillis() > 0) ? (Runnable) () -> {
+ } : System.out::println;
+ }
+
public void easyLambda() {
final java.lang.Runnable foo = (Runnable) () -> {
};
}
+
public void easyIntersectionLambda() {
final java.lang.Runnable foo = (Runnable & java.io.Serializable) () -> {
};
final java.io.Serializable bar = (java.io.Serializable & Runnable) () -> {
};
}
+
public void easyLubLambda() {
final java.lang.Runnable foo = (System.currentTimeMillis() > 0) ? (Runnable) () -> {
} : System.out::println;