K2: disable compatibility mode for new inference
#KT-64306 Fixed #KT-64307 Fixed #KT-64308 Fixed
This commit is contained in:
+12
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user