KT-38337 Fix inline class value coercion in delegated members

This commit is contained in:
Dmitry Petrov
2020-04-20 18:25:25 +03:00
parent 29f19c78f2
commit 318d4d17ba
15 changed files with 586 additions and 36 deletions
@@ -0,0 +1,13 @@
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
// IGNORE_BACKEND_FIR: JVM_IR
inline class Wrapper(val id: Int)
class DMap(private val map: Map<Wrapper, String>) :
Map<Wrapper, String> by map
fun box(): String {
val dmap = DMap(mutableMapOf(Wrapper(42) to "OK"))
return dmap[Wrapper(42)] ?: "Fail"
}