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
@@ -1,6 +1,10 @@
// !LANGUAGE: +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER
// IGNORE_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// java.lang.IllegalStateException: OVERLOAD_RESOLUTION_AMBIGUITY: Overload resolution ambiguity:
// public fun foo(x: () -> Int): Unit defined in root package in file overloadResolutionBySuspendModifier.kt
// public fun foo(x: suspend () -> Int): Unit defined in root package in file overloadResolutionBySuspendModifier.kt (15,5) in /overloadResolutionBySuspendModifier.kt
var foo1 = false
var foo2 = false
@@ -1,6 +1,8 @@
// !LANGUAGE: +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
// WITH_STDLIB
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
// K2 status: java.lang.Integer cannot be cast to java.lang.String (inference changed due to KT-63558)
object Test1 {
fun foo(f: () -> Unit) {}