FIR: account for vararg when creating KFunction type for callable reference
This commit is contained in:
committed by
Mikhail Glukhikh
parent
e5e50eabe9
commit
4e14f9500f
@@ -295,7 +295,10 @@ private fun FirSession.createKFunctionType(
|
||||
else -> expectedParameterNumberWithReceiver
|
||||
}
|
||||
for ((index, valueParameter) in function.valueParameters.withIndex()) {
|
||||
if (expectedParameterNumber == null || index < expectedParameterNumber || valueParameter.defaultValue == null) {
|
||||
if (expectedParameterNumber == null ||
|
||||
index < expectedParameterNumber ||
|
||||
(valueParameter.defaultValue == null && !valueParameter.isVararg)
|
||||
) {
|
||||
parameterTypes += valueParameter.returnTypeRef.coneType
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user