Files
kotlin-fork/compiler/testData/diagnostics/tests/samConversions/SAMAfterSubstitution.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

19 lines
314 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// FILE: J.java
public interface J<T> {
public void foo(T r1, T r2);
}
// FILE: Runnable.java
public interface Runnable {
void run();
}
// FILE: 1.kt
fun test(j: J<Runnable>, r: Runnable) {
j.foo(r, r)
j.foo(r, {})
j.foo({}, r)
j.foo({}, {})
}