Files
kotlin-fork/compiler/testData/codegen/box/delegation/delegationDifferentModule2.kt
T
Ilya Chernikov a045a0a81c FIR: use default getter in serializer if fir contains none
since we generate the default getter in this case in
Fir2IrDeclarationStorage.createIrProperty, so the serialized metadata
should follow the same behavior.
#KT-57373 fixed
2023-04-27 09:14:20 +00:00

25 lines
354 B
Kotlin
Vendored

// MODULE: lib
// FILE: lib.kt
interface I {
val bar: Int
}
class Impl : I {
override val bar: Int = 42
}
class D1(foo: I) : I by foo
// MODULE: main(lib)
// FILE: main.kt
class D2(foo: I) : I by foo
fun box() : String {
val c = Impl()
if (D1(c).bar != 42) return "FAIL 1"
if (D2(c).bar != 42) return "FAIL 2"
return "OK"
}