FIR: Temporary support FE 1.0 behavior for SAM vs. generic ambiguity

^KT-48300 Relates
^KT-48938 Fixed
This commit is contained in:
Denis.Zharkov
2021-10-08 21:06:09 +03:00
committed by TeamCityServer
parent 10c5d987d7
commit 056657525e
7 changed files with 113 additions and 7 deletions
@@ -0,0 +1,14 @@
// !LANGUAGE: +DisableCompatibilityModeForNewInference
// SKIP_TXT
// FIR_IDENTICAL
// FULL_JDK
fun <T> bar(action: () -> T): T = action()
fun bar(action: java.lang.Runnable) { }
fun foo(): String = ""
fun main() {
val x = bar() { foo() } // OK with default current 1.5/1.6, Error with DisableCompatibilityModeForNewInference enabled
x.<!UNRESOLVED_REFERENCE!>length<!>
}