Minor: add regression test for KT-41806
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user