f79b282c60
#KT-32702 fixed #KT-19327 fixed
17 lines
299 B
Java
Vendored
17 lines
299 B
Java
Vendored
interface FunctionalI<A, B> {
|
|
B apply(A x);
|
|
}
|
|
|
|
class Test {
|
|
<A, B> B foo(A value, FunctionalI<A, B> fun) {
|
|
return fun.apply(value);
|
|
}
|
|
|
|
Double toDouble(Integer x) {
|
|
return x.doubleValue();
|
|
}
|
|
|
|
public double nya() {
|
|
return foo(1, this::toDouble);
|
|
}
|
|
} |