FIR: Do not invert order of synthetic variables

This commit is contained in:
Simon Ogorodnik
2021-11-22 16:02:14 +03:00
committed by teamcity
parent df9da371cb
commit 951eebcd68
@@ -391,7 +391,7 @@ class ConstraintSystemCompleter(private val components: BodyResolveComponents, p
topLevel.collectAllTypeVariables()
}
result.addAll(c.notFixedTypeVariables.filter { context.inferenceSession.isSyntheticTypeVariable(it.value.typeVariable) }.keys.asIterable().reversed())
result.addAll(c.notFixedTypeVariables.filter { context.inferenceSession.isSyntheticTypeVariable(it.value.typeVariable) }.keys.asIterable())
require(result.size == c.notFixedTypeVariables.size) {
val notFoundTypeVariables = c.notFixedTypeVariables.keys.toMutableSet().apply { removeAll(result) }