[NI] Continue resolution after unstable smart cast on receiver
The old inference cosideres candidates with unstable smartcast on receiver unsuccessful, therefore another one may be selected. KT-36264
This commit is contained in:
@@ -18,7 +18,7 @@ fun foo(list: StringList, arg: Unstable) {
|
||||
list.remove(arg.first)
|
||||
if (arg.first?.isEmpty() ?: false) {
|
||||
// Should be still resolved to extension, without smart cast or smart cast impossible
|
||||
list.remove(<!OI;SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
||||
list.remove(<!NI;SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,6 @@ fun bar(list: BooleanList, arg: UnstableBoolean) {
|
||||
list.remove(arg.first)
|
||||
if (arg.first ?: false) {
|
||||
// Should be still resolved to extension, without smart cast or smart cast impossible
|
||||
list.remove(<!OI;SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
||||
list.remove(<!NI;SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user