Fix SAM conversions for derived classes

#KT-39535 Fixed
 #KT-37149 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-06-15 17:19:28 +03:00
parent ee6d432ced
commit df1595e4bc
13 changed files with 171 additions and 50 deletions
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// FILE: J.java
public interface J<T> {
@@ -12,7 +13,7 @@ public interface Runnable {
// FILE: 1.kt
fun test(j: J<Runnable>, r: Runnable) {
j.foo(r, r)
j.foo(r, <!TYPE_MISMATCH!>{}<!>)
j.foo(<!TYPE_MISMATCH!>{}<!>, r)
j.foo(<!TYPE_MISMATCH!>{}<!>, <!TYPE_MISMATCH!>{}<!>)
j.foo(r, {})
j.foo({}, r)
j.foo({}, {})
}