K2: disable compatibility mode for new inference

#KT-64306 Fixed
#KT-64307 Fixed
#KT-64308 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-12-13 17:11:31 +01:00
parent d5e4c1db50
commit a7dc381b93
11 changed files with 34 additions and 17 deletions
@@ -0,0 +1,12 @@
// SKIP_TXT
// 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<!>
}
@@ -1,5 +1,4 @@
// SKIP_TXT
// FIR_IDENTICAL
// FULL_JDK
fun <T> bar(action: () -> T): T = action()