K2: Fix inference from assignment in PCLA

Before this, the order of the constraints being added was incorrect

^KT-64222 Fixed
This commit is contained in:
Denis.Zharkov
2024-01-11 11:28:52 +01:00
committed by Space Team
parent 97d17012e5
commit 8f9c09482b
6 changed files with 21 additions and 35 deletions
@@ -27,14 +27,14 @@ fun test() {
var variable = getTypeVariable()
variable = TargetType()
variable.<!UNRESOLVED_REFERENCE!>targetTypeMemberFunction<!>()
variable = <!ASSIGNMENT_TYPE_MISMATCH!>DifferentType()<!>
variable = DifferentType()
variable.<!UNRESOLVED_REFERENCE!>targetTypeMemberFunction<!>()
variable = TargetType()
variable.<!UNRESOLVED_REFERENCE!>targetTypeMemberFunction<!>()
}
// exact type equality check — turns unexpected compile-time behavior into red code
// considered to be non-user-reproducible code for the purposes of these tests
checkExactType<Buildee<Any>>(<!ARGUMENT_TYPE_MISMATCH!>anyBuildee<!>)
checkExactType<Buildee<Any>>(anyBuildee)
}