[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// !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) {
|
||||
if (e == null)
|
||||
break
|
||||
// Smart casts are possible because of the break before
|
||||
e.doSomething()
|
||||
e = e.next()
|
||||
}
|
||||
return e
|
||||
}
|
||||
Reference in New Issue
Block a user