Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt
T
Alexander Udalov f949d9e804 Retain data flow info after assignment statements
#KT-2825 In Progress
2012-11-16 17:56:15 +04:00

18 lines
197 B
Kotlin

trait A
trait B : A {
fun foo()
}
fun bar1(a: A, var b: B) {
b = a as B
a.foo()
b.foo()
}
fun id(b: B) = b
fun bar2(a: A, var b: B) {
b = id(a as B)
a.foo()
b.foo()
}