[FE 1.0] Eliminate resolution ambiguity on inherited SAM-interfaces

^KT-17765 Fixed
This commit is contained in:
Victor Petukhov
2021-11-16 10:59:45 +03:00
committed by teamcityserver
parent a5c6d370dd
commit a6fd14d4e6
27 changed files with 271 additions and 46 deletions
+20
View File
@@ -0,0 +1,20 @@
// IGNORE_BACKEND: JS, NATIVE, WASM, JS_IR, JS_IR_ES6
// !LANGUAGE: +EliminateAmbiguitiesOnInheritedSamInterfaces
// FILE: Test.java
public class Test {
interface MyRunnable extends Runnable {}
public static void foo(MyRunnable r) {}
public static void foo(Runnable r) {}
}
// FILE: 1.kt
fun main(args: Array<String>) {
Test.foo { }
}
fun box(): String {
main(arrayOf("", ""))
return "OK"
}