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:
committed by
Space Team
parent
97d17012e5
commit
8f9c09482b
Vendored
+6
-6
@@ -46,23 +46,23 @@ fun main(arg: Any, condition: Boolean) {
|
||||
|
||||
val value2 = myBuilder {
|
||||
accept("")
|
||||
a = <!ASSIGNMENT_TYPE_MISMATCH!>45<!>
|
||||
a = 45
|
||||
when (condition) {
|
||||
true -> a = <!ASSIGNMENT_TYPE_MISMATCH!>87<!>
|
||||
false -> a = <!ASSIGNMENT_TYPE_MISMATCH!>65<!>
|
||||
true -> a = 87
|
||||
false -> a = 65
|
||||
}
|
||||
change {
|
||||
a = <!ASSIGNMENT_TYPE_MISMATCH!>99<!>
|
||||
a = 99
|
||||
}
|
||||
if (a is Int) {
|
||||
a = <!ASSIGNMENT_TYPE_MISMATCH!>67<!>
|
||||
a = 67
|
||||
}
|
||||
}
|
||||
|
||||
// See KT-54664
|
||||
val value3 = myBuilder {
|
||||
accept("")
|
||||
a = <!ASSIGNMENT_TYPE_MISMATCH!>45<!>
|
||||
a = 45
|
||||
bar(::<!INAPPLICABLE_CANDIDATE!>a<!>)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user