Files
kotlin-fork/compiler/testData/diagnostics/tests/samConversions/SAMAfterSubstitutionKT.kt
T
Mikhail Zarechenskiy df1595e4bc Fix SAM conversions for derived classes
#KT-39535 Fixed
 #KT-37149 Fixed
2020-06-18 12:36:30 +03:00

18 lines
317 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions
// FILE: Runnable.java
public interface Runnable {
void run();
}
// FILE: 1.kt
interface K<T> {
fun foo(t1: T, t2: T)
}
fun test(k: K<Runnable>, r: Runnable) {
k.foo(r, r)
k.foo(r, {})
k.foo({}, r)
k.foo({}, {})
}