[FIR] Implement new bound smartcast algorithm
#KT-36055 Fixed
This commit is contained in:
@@ -9,8 +9,8 @@ fun list(start: SomeObject): SomeObject {
|
||||
var e: SomeObject? = start
|
||||
for (i in 0..42) {
|
||||
// Unsafe calls because of nullable e at the beginning
|
||||
e.<!INAPPLICABLE_CANDIDATE!>doSomething<!>()
|
||||
e = e.<!INAPPLICABLE_CANDIDATE!>next<!>()
|
||||
e.doSomething()
|
||||
e = e.next()
|
||||
}
|
||||
// Smart cast is not possible here due to next()
|
||||
return e
|
||||
|
||||
Reference in New Issue
Block a user