[FIR] Fix clearing info about DF variable after reassignment
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
abstract class A {
|
||||
abstract fun foo(): String
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun foo() = "OK"
|
||||
}
|
||||
|
||||
class C : A() {
|
||||
override fun foo() = "fail"
|
||||
}
|
||||
|
||||
fun test(c: C, cond: Boolean): String {
|
||||
var x: A = c
|
||||
if (cond) {
|
||||
x = B()
|
||||
}
|
||||
return x.foo()
|
||||
}
|
||||
|
||||
fun box(): String = test(C(), true)
|
||||
Reference in New Issue
Block a user