[FIR] Fix TYPE_VARIANCE_CONFLICT location for function type with receiver

It should be covered by an example from KT-50947
This commit is contained in:
Ivan Kochurkin
2022-01-26 23:34:22 +03:00
committed by teamcity
parent 8a8bdc9ff4
commit 828c442518
@@ -645,6 +645,7 @@ fun extractArgumentsTypeRefAndSource(typeRef: FirTypeRef?): List<FirTypeRefSourc
is FirFunctionTypeRef -> {
val valueParameters = delegatedTypeRef.valueParameters
delegatedTypeRef.receiverTypeRef?.let { result.add(FirTypeRefSource(it, it.source)) }
for (valueParameter in valueParameters) {
val valueParamTypeRef = valueParameter.returnTypeRef
result.add(FirTypeRefSource(valueParamTypeRef, valueParamTypeRef.source))