Files
kotlin-fork/nj2k/testData/newJ2k/function/externalKtFunctionalInterface.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

14 lines
291 B
Java
Vendored

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() {
//TODO explicitlly call apply here
return foo(1, this::toDouble);
}
}