FIR: postpone callable reference candidate in default argument case
#KT-53019 Fixed
This commit is contained in:
@@ -456,6 +456,19 @@ class FirCallResolver(
|
||||
}
|
||||
|
||||
val chosenCandidate = reducedCandidates.single()
|
||||
if (!resolvedCallableReferenceAtom.hasBeenPostponed &&
|
||||
expectedType is ConeTypeVariableType &&
|
||||
chosenCandidate.symbol.fir.let { func ->
|
||||
func is FirSimpleFunction && func.valueParameters.any { param ->
|
||||
param.defaultValue != null
|
||||
}
|
||||
}
|
||||
) {
|
||||
resolvedCallableReferenceAtom.hasBeenPostponed = true
|
||||
return applicability to true
|
||||
}
|
||||
|
||||
|
||||
constraintSystemBuilder.runTransaction {
|
||||
chosenCandidate.outerConstraintBuilderEffect!!(this)
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user