JVM KT-41150: Fix backward compatibility for inline vals in inline class

In 1.3.x, for inline class member inline vals 'getFoo-impl' method was
generated in corresponding inline class.
Since 1.4.0, getters for properties returning inline class values are
mangled (so corresponding getters are named 'getFoo-<mangling_hash>'.
However, to maintain backward compatibility with libraries compiled with
1.3.x, inliner should be able to find 'getFoo-impl' method in the
bytecode.
This commit is contained in:
Dmitry Petrov
2020-08-24 11:54:59 +03:00
parent 27a22fc1e9
commit a2dabe11c5
9 changed files with 59 additions and 0 deletions
@@ -0,0 +1,20 @@
// !LANGUAGE: +InlineClasses
// FILE: 1.kt
package test
inline class IC1(val x: String) {
inline val test get() = IC2(x)
}
inline class IC2(val x: String)
// FILE: 2.kt
// NO_CHECK_LAMBDA_INLINING
import test.*
fun box() : String =
IC1("OK").test.x