cb5e451e05
for regular classes only. Reimplementing the main behavior of the old BE and implementing few cases on top of it. #KT-19423 fixed
18 lines
217 B
Kotlin
Vendored
18 lines
217 B
Kotlin
Vendored
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
|
|
|
// expected: rv: 42
|
|
|
|
fun foo() = B.bar()
|
|
|
|
val life = 42
|
|
|
|
interface A {
|
|
fun bar(): Int
|
|
}
|
|
|
|
val B = object : A {
|
|
override fun bar() = life
|
|
}
|
|
|
|
val rv = foo()
|