SAM-conversions only work for Java methods, not supported for Kotlin functions, because Kotlin has nice functional types, and there's no need for SAM conversion (in your case, I'd convert the lambda inside f2)
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Why Diffrence of annomous Impl of Interface declared in between Java and Kotlin
|
2 | 2756 | May 3, 2016 | |
SAM conversion on Kotlin Interfaces
|
4 | 9691 | October 9, 2018 | |
SAM/Functional Interfaces and interoperability with Java | 2 | 759 | June 29, 2022 | |
SAM type inference if multiple method overloads accept a fitting SAM type | 1 | 749 | April 8, 2019 | |
Kotlin SAM interfaces
|
4 | 441 | March 7, 2024 |