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
This commit is contained in:
committed by
Space Team
parent
913b55174d
commit
a045a0a81c
@@ -0,0 +1,24 @@
|
||||
// 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"
|
||||
}
|
||||
Reference in New Issue
Block a user