[NI] Don't skip constraints with projections during variable fixation

Those constraints are only restored for variable fixation stage because of the
influence on pefrormance.

^KT-37650 Fixed
^KT-37380 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-03-23 15:45:32 +03:00
parent 1f6834538b
commit adf3351a8b
11 changed files with 59 additions and 17 deletions
@@ -0,0 +1,14 @@
// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
class Inv<T>
fun <T> materialize(): T = TODO()
fun <A> foo(x: Inv<A>) {}
fun <B> bar(y: Inv<out B>): Inv<Inv<out B>> = materialize()
fun <K> test(plant: Inv<out K>) {
val x = foo(bar(plant)) // OK in OI, NI: "Not enough information to infer type variable A"
}
@@ -0,0 +1,13 @@
package
public fun </*0*/ B> bar(/*0*/ y: Inv<out B>): Inv<Inv<out B>>
public fun </*0*/ A> foo(/*0*/ x: Inv<A>): kotlin.Unit
public fun </*0*/ T> materialize(): T
public fun </*0*/ K> test(/*0*/ plant: Inv<out K>): kotlin.Unit
public final class Inv</*0*/ T> {
public constructor Inv</*0*/ T>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}