[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.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bas<!> { <!UNRESOLVED_REFERENCE!>it<!> checkType { _<Any?>() }; "" } <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Int>() }
// NI: TODO
k.bar { it checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Any>() }; "" } checkType { _<Int>() }
k.bar { it checkType { _<String>() }; "" } checkType { _<Int>() }
}