FIR: Correct capturing for type-alias bases arguments
NB: The test data change at testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt is correct: see the relevant non-fir test, the call shouldn't be applicable ^KT-39008 Fixed
This commit is contained in:
@@ -241,7 +241,13 @@ private fun Candidate.captureTypeFromExpressionOrNull(argumentType: ConeKotlinTy
|
||||
return captureTypeFromExpressionOrNull(argumentType.lowerBound)
|
||||
}
|
||||
|
||||
if (argumentType.typeArguments.isEmpty() || argumentType !is ConeClassLikeType) return null
|
||||
if (argumentType !is ConeClassLikeType) return null
|
||||
|
||||
argumentType.fullyExpandedType(bodyResolveComponents.session).let {
|
||||
if (it !== argumentType) return captureTypeFromExpressionOrNull(it)
|
||||
}
|
||||
|
||||
if (argumentType.typeArguments.isEmpty()) return null
|
||||
|
||||
return bodyResolveComponents.inferenceComponents.ctx.captureFromArguments(
|
||||
argumentType, CaptureStatus.FROM_EXPRESSION
|
||||
|
||||
Reference in New Issue
Block a user