Files
kotlin-fork/compiler/testData/codegen/box/inference/kt45118.kt
T
2021-09-30 20:08:59 +03:00

12 lines
192 B
Kotlin
Vendored

open class Foo(open val x: Boolean)
class Bar: Foo(false) {
val y = "OK"
}
fun contract(x: Foo) = x
val temp = if (true) contract(Bar()) else Bar()
fun box(): String = (temp as Bar).y