[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
data class SomeObject(val n: SomeObject?) {
|
||||
fun doSomething() {}
|
||||
fun next(): SomeObject? = n
|
||||
}
|
||||
|
||||
|
||||
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<!>()
|
||||
}
|
||||
// Smart cast is not possible here due to next()
|
||||
return e
|
||||
}
|
||||
Reference in New Issue
Block a user