Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt
T
Alexander Udalov 3cbdb57d5c Retain data flow info after assignments in initializer
#KT-2825 In Progress
2012-11-16 17:56:14 +04:00

22 lines
248 B
Kotlin

// 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()
}