Retain data flow info after assignments in initializer

#KT-2825 In Progress
This commit is contained in:
Alexander Udalov
2012-11-07 19:36:46 +04:00
parent d19a824b14
commit 3cbdb57d5c
3 changed files with 32 additions and 3 deletions
@@ -0,0 +1,21 @@
// KT-2825 DataFlowInfo is not retained after assignment
trait A
trait B : A {
fun foo()
}
fun baz(b: B) = b
fun bar1(a: A) {
val b = a as B
a.foo()
b.foo()
}
fun bar2(a: A) {
val b = baz(a as B)
a.foo()
b.foo()
}