FIR: fix findClassRepresentation for dynamic type

related to KT-53463 and KT-53464
needed e.g. to find proper (fake) override on calls on dynamic receiver
fixes test js/js.translator/testData/box/dynamic/equals.kt
This commit is contained in:
Ilya Chernikov
2022-08-03 12:25:47 +02:00
parent 8feb2a9505
commit dfa1e8d03d
@@ -118,6 +118,7 @@ fun ConeKotlinType.findClassRepresentation(
): ConeClassLikeLookupTag? =
when (this) {
is ConeClassLikeType -> this.fullyExpandedType(session).lookupTag
is ConeDynamicType -> upperBound.findClassRepresentation(dispatchReceiverParameterType, session)
is ConeFlexibleType -> lowerBound.findClassRepresentation(dispatchReceiverParameterType, session)
is ConeCapturedType -> constructor.supertypes.orEmpty()
.findClassRepresentationThatIsSubtypeOf(dispatchReceiverParameterType, session)