aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/ValLambda.java
blob: 60aeaac9a7450bc7bff6b65d56e7b83dca6fb19a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// version 8:
class ValLambda {
	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) () -> {
		} : (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);
//	}
}