Files
kotlin-fork/compiler/testData/codegen/box/regressions/kt41806.kt
T
2021-02-15 11:37:39 +03:00

26 lines
310 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_RUNTIME
open class A {
fun Foo() {
print("Fop")
}
}
class B() : A()
class C() : A()
fun box(): String {
var test : A = B()
println((test as B).toString())
listOf(1,2 ,3).forEach { it ->
test = C()
}
test.Foo()
return "OK"
}