[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
abstract class Runnable {
|
||||
abstract fun run()
|
||||
}
|
||||
|
||||
fun foo(): Int {
|
||||
val c: Int? = null
|
||||
var a: Int?
|
||||
if (c is Int) {
|
||||
a = 2
|
||||
val k = object: Runnable() {
|
||||
init {
|
||||
a = null
|
||||
}
|
||||
override fun run() = Unit
|
||||
}
|
||||
k.run()
|
||||
val d: Int = c
|
||||
// a is captured so smart cast is not possible
|
||||
return d + a
|
||||
}
|
||||
else return -1
|
||||
}
|
||||
Reference in New Issue
Block a user