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
19 lines
283 B
Kotlin
19 lines
283 B
Kotlin
trait A {
|
|
fun foo(): String = "A"
|
|
}
|
|
|
|
trait B {
|
|
fun foo(): Any
|
|
}
|
|
|
|
class C : A, B
|
|
|
|
fun box(): String {
|
|
val c = C()
|
|
var result = ""
|
|
result += c.foo()
|
|
result += (c : B).foo()
|
|
result += (c : A).foo()
|
|
return if (result == "AAA") "OK" else "Fail: $result"
|
|
}
|