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:
Vendored
+20
@@ -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
|
||||
Reference in New Issue
Block a user