blob: a5364f8e1580a264a75ae98e0e39bcb22af22e8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// version 8:
import lombok.val;
class ValInLambda {
Runnable foo = (Runnable) () -> {
val i = 1;
lombok.val foo = (System.currentTimeMillis() > 0) ? (Runnable)()-> {} : System.out::println;
};
public void easyLambda() {
Runnable foo = (Runnable) () -> {
val i = 1;
};
}
public void easyIntersectionLambda() {
Runnable foo = (Runnable) () -> {
val i = 1;
};
}
public void easyLubLambda() {
Runnable foo = (Runnable) () -> {
lombok.val fooInner = (System.currentTimeMillis() > 0) ? (Runnable)()-> {} : System.out::println;
};
}
}
|