[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.
This commit is contained in:
Mads Ager
2021-05-06 14:08:49 +02:00
committed by Alexander Udalov
parent 1181854bd6
commit b6fa28ea81
10 changed files with 68 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
// 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
}