[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// See KT-6293: Smart cast doesn't work after object literal
|
||||
abstract class Runnable {
|
||||
abstract fun run()
|
||||
}
|
||||
|
||||
fun foo(): Int {
|
||||
val c: Int? = null
|
||||
if (c is Int) {
|
||||
var k: Runnable
|
||||
val d: Int = c
|
||||
k = object: Runnable() {
|
||||
override fun run() = Unit
|
||||
}
|
||||
// Unnecessary but not important smart cast
|
||||
k.run()
|
||||
return c + d
|
||||
}
|
||||
else return -1
|
||||
}
|
||||
Reference in New Issue
Block a user