Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kt45084.kt
T
Mads Ager b6fa28ea81 [JVM_IR] Deal with inline-class arguments in large arity lambdas.
FunctionNVarargBridgeLowering checked the name of the method instead
of whether the method overrides an invoke method. That doesn't work
when the name of the function gets mangled because of inline class
arguments.

Fixed KT-45084.
2021-05-06 17:27:59 +02:00

21 lines
627 B
Kotlin
Vendored

// IGNORE_BACKEND: WASM
inline class Z(val value: Long)
fun f(g: (
z: Z,
p01: Long, p02: Long, p03: Long, p04: Long, p05: Long, p06: Long, p07: Long, p08: Long, p09: Long, p10: Long,
p11: Long, p12: Long, p13: Long, p14: Long, p15: Long, p16: Long, p17: Long, p18: Long, p19: Long, p20: Long,
p21: Long, p22: Long
) -> Unit) {
g(Z(42L), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
}
fun box(): String {
var result = ""
f { z, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ ->
result = if (z.value == 42L) "OK" else "FAIL"
}
return result
}