[FIR] Improved lambda completion: initial implementation
Repeat the logic of KotlinConstraintSystemCompleter in ConstraintSystemCompleter. Implement additional context operations required for updated lambda completion algorithm.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
|
||||
// !LANGUAGE: +InferenceCompatibility
|
||||
|
||||
fun <T, VR : T> foo(x: T, fn: (VR?, T) -> Unit) {}
|
||||
|
||||
fun takeInt(x: Int) {}
|
||||
|
||||
fun main(x: Int) {
|
||||
foo(x) { prev: Int?, new -> <!INAPPLICABLE_CANDIDATE!>takeInt<!>(new) } // `new` is `Int` in OI, `Int?` in NI
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
|
||||
// !LANGUAGE: +InferenceCompatibility
|
||||
|
||||
|
||||
Reference in New Issue
Block a user