IC: call JvmDefault method of inline class using boxed receiver

#KT-43698 Fixed
This commit is contained in:
Ilmir Usmanov
2020-12-07 15:13:54 +01:00
parent d6330337a9
commit 0dc5f3ac00
19 changed files with 227 additions and 78 deletions
@@ -0,0 +1,16 @@
// !JVM_DEFAULT_MODE: all
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// JVM_TARGET: 1.8
class Cell<T>(val x: T)
interface IOk {
fun ok(): String = "OK"
}
inline class InlineClass(val s: String) : IOk
fun test(cell: Cell<InlineClass>): String = cell.x.ok()
fun box() = test(Cell(InlineClass("FAIL")))