79e7ee91e4
The intent was to keep the bridge codegen model as simple as possible: we should be able to figure out all necessary bridges only by a minimal interface that FunctionHandle provides (isAbstract, isDeclaration, getOverridden) Add different tests for bridges #KT-318 Obsolete
24 lines
373 B
Kotlin
24 lines
373 B
Kotlin
var result = ""
|
|
|
|
trait Base
|
|
open class Child : Base
|
|
|
|
trait 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())
|
|
(b : A<Child>).foo(Child())
|
|
return if (result == "BB") "OK" else "Fail: $result"
|
|
}
|