Files
kotlin-fork/compiler/testData/codegen/box/bridges/kt318.kt
T
Dmitriy Novozhilov 6735cc8937 [FIR] Implement new bound smartcast algorithm
#KT-36055 Fixed
2020-02-12 10:17:45 +03:00

25 lines
392 B
Kotlin
Vendored

var result = ""
interface Base
open class Child : Base
interface A<T : Base> {
fun <E : T> foo(a : E) {
result += "A"
}
}
class B : A<Child> {
override fun <E : Child> foo(a : E) {
result += "B"
}
}
fun box(): String {
val b = B()
b.foo(Child())
val a: A<Child> = b
a.foo(Child())
return if (result == "BB") "OK" else "Fail: $result"
}