Files
kotlin-fork/nj2k/testData/newJ2k/function/internalFunctionalInterface.java
T
Ilya Kirillov f79b282c60 New J2K: add better support of implicit functional interfaces
#KT-32702 fixed
#KT-19327 fixed
2019-07-25 14:34:34 +03:00

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);
}
}