46ae6136cb
- Now inspection does not rely on synthetic descriptors at all, instead it uses `SamConversionOracle` and `SamConversionResolver` to detect if the argument type support SAM conversion - This transparently considers all language features like `SAM conversions for kotlin functions`, `Functional interfaces` etc. - In case of multiple SAM arguments, part of them can be converted only when `SAM conversion per argument` is enabled - Fix inspection and nj2k tests that were failing because of better working inspection - Rewrite automatically fixes multiple bugs that were present - ^KT-36367 ^KT-36368 ^KT-36296 ^KT-36395 Fixed
13 lines
289 B
Kotlin
Vendored
13 lines
289 B
Kotlin
Vendored
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference -XXLanguage:+SamConversionForKotlinFunctions -XXLanguage:+FunctionalInterfaceConversion
|
|
|
|
fun interface KtRunnable {
|
|
fun run()
|
|
}
|
|
|
|
class Test {
|
|
fun usage(r: KtRunnable) {}
|
|
|
|
fun test() {
|
|
usage(KtRunnable<caret> { })
|
|
}
|
|
} |