JVM_IR: change parameter type computation in InlineCallableReferenceToLambda
The reference type is approximated in Psi2Ir, so we may get Nothing as a reference type argument. Better look at the arguments of the referenced function.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
inline fun <TT> id(x: TT): TT = x
|
||||
inline fun <TT> String.extId(x: TT): String = this
|
||||
|
||||
private fun <T> ff(value: T?): String {
|
||||
// In PSI2IR, the funcref is approximated to Function1<Nothing, Pair<String, T>>
|
||||
value?.let(::id)
|
||||
return value?.let("OK"::extId)!!
|
||||
}
|
||||
|
||||
fun box() = ff("arg")
|
||||
|
||||
Reference in New Issue
Block a user