[NI] Use compatibility mode for KT-41934

This commit is contained in:
Pavel Kirpichenkov
2020-09-18 12:12:42 +03:00
parent 1465e10f12
commit fdc134ff66
6 changed files with 65 additions and 22 deletions
@@ -1,12 +1,11 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
// !LANGUAGE: +NewInference
// !LANGUAGE: +InferenceCompatibility
fun <T, VR : T> foo(x: T, fn: (VR?/*T?*/, T) -> Unit) {}
fun <T, VR : T> foo(x: T, fn: (VR?, T) -> Unit) {}
fun takeInt(x: Int) {}
fun main(x: Int) {
foo(x) { prev: Int?, new -> takeInt(new) } // `new` is `Int` in OI, `Int?` in NI
// It seems, `VR` has been fixed to `Int?` instead of `Int`
}