[FIR2IR] Remove obsolete TODO
#KT-62865
This commit is contained in:
committed by
Space Team
parent
0c5a925b6e
commit
eb0f4167b3
+2
-6
@@ -443,8 +443,7 @@ internal class AdapterGenerator(
|
|||||||
argumentConeType: ConeKotlinType,
|
argumentConeType: ConeKotlinType,
|
||||||
samType: ConeKotlinType,
|
samType: ConeKotlinType,
|
||||||
): IrExpression {
|
): IrExpression {
|
||||||
// The rule for SAM conversions is:
|
// The rule for SAM conversions is: the argument must be a subtype of the required function type.
|
||||||
// the argument must be a non-reflection function type and be a subtype of the required function type.
|
|
||||||
// We handle intersection types, captured types, etc. by approximating both expected and actual types.
|
// We handle intersection types, captured types, etc. by approximating both expected and actual types.
|
||||||
val approximatedConeKotlinFunctionType = getFunctionTypeForPossibleSamType(samType)?.approximateForIrOrSelf() ?: return argument
|
val approximatedConeKotlinFunctionType = getFunctionTypeForPossibleSamType(samType)?.approximateForIrOrSelf() ?: return argument
|
||||||
|
|
||||||
@@ -453,10 +452,7 @@ internal class AdapterGenerator(
|
|||||||
// tests from FirBlackBoxCodegenTestGenerated relevant to INDY start failing once this line is removed.
|
// tests from FirBlackBoxCodegenTestGenerated relevant to INDY start failing once this line is removed.
|
||||||
val approximateArgumentConeType = argumentConeType.approximateForIrOrSelf()
|
val approximateArgumentConeType = argumentConeType.approximateForIrOrSelf()
|
||||||
|
|
||||||
if (approximateArgumentConeType.isSubtypeOf(approximatedConeKotlinFunctionType, session)
|
if (approximateArgumentConeType.isSubtypeOf(approximatedConeKotlinFunctionType, session)) {
|
||||||
// TODO uncomment when KT-63510 is fixed, probably fixes KT-62865
|
|
||||||
// && approximateArgumentConeType.lowerBoundIfFlexible().functionTypeKind(session)?.isReflectType == false
|
|
||||||
) {
|
|
||||||
return argument
|
return argument
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user