Files
kotlin-fork/compiler/resolution
Mikhail Zarechenskiy 650e2501bb [NI] Prioritize variables with trivial constraints over complex ones
Consider the following constraint system (from the test example):

Nothing? <: V1
F!! <: V2
Inv<V1> <: S
Inv<V2> <: S

Where V1, V2, S are type variables, and F has nullable upper bound.
Type variable fixation order should be: V2 -> V1 -> S, and the problem
was that previously after fixation of type variable V2 we were trying
to fix S (before V1), so we had the following constraints on S:
Inv<F!!> <: S
Inv<V1> <: S
=> S were fixed to Inv<F!!>

And after this V1 was fixed to F!! which is contradictory as Nothing?
is not a subtype of F!!.

 #KT-33033 Fixed
2019-11-06 15:20:17 +03:00
..