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