[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
@@ -1,4 +1,4 @@
// !LANGUAGE: +NewInference
// !LANGUAGE: +EliminateAmbiguitiesOnInheritedSamInterfaces
// !CHECK_TYPE
// FILE: Fn.java
public interface Fn<T, R> {
@@ -26,6 +26,5 @@ fun test(j: J) {
j.bas({ it checkType { _<Any>() }; "" }, "") checkType { _<Int>() }
// NI: TODO
j.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!> { <!UNRESOLVED_REFERENCE!>it<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Any>() }; "" } <!DEBUG_INFO_MISSING_UNRESOLVED!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
j.bar { it checkType { _<String>() }; "" } checkType { _<Int>() }
}