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
354 B
Kotlin
24 lines
354 B
Kotlin
var result = ""
|
|
|
|
trait A {
|
|
var foo: String
|
|
get() = result
|
|
set(value) {
|
|
result += value
|
|
}
|
|
}
|
|
|
|
abstract class B {
|
|
abstract var foo: Any
|
|
}
|
|
|
|
class C : A, B()
|
|
|
|
fun box(): String {
|
|
val c = C()
|
|
c.foo = "1"
|
|
(c : B).foo = "2"
|
|
(c : A).foo = "3"
|
|
return if (result == "123") "OK" else "Fail: $result"
|
|
}
|