Files
kotlin-fork/compiler/resolution.common
Nikita Bobko a9583e4f9a [FIR, IR] 1/2 Align FirExpectActualMatchingContextImpl.areCompatibleExpectActualTypes with ExpectActualUtilsKt.areCompatibleExpectActualTypes
Those two functions are copy-paste of each other. They diverged since
the time they were copy-pasted. This commit makes
FirExpectActualMatchingContextImpl.areCompatibleExpectActualTypes
up-to-date.

I didn't update ExpectActualUtilsKt.areCompatibleExpectActualTypes
because I will drop it in the next commit.

Change in `dynamicTypesEqualToAnything` doesn't change any logic (yet.
This change in logic will take effect in the next commit), because:
1. `dynamicTypesEqualToAnything` is only changed in
AbstractExpectActualChecker.getCallablesCheckingIncompatibility. But
AbstractExpectActualChecker.getCallablesCheckingIncompatibility doesn't
check return types on frontend (it only check return types on backend).
2. `dynamicTypesEqualToAnything` is ignored on IR backend

I have no idea what is the difference between `createTypeCheckerState()`
and `actualSession.typeContext`, but it aligns these copy-pasted
versions and makes the tests behave like in K1 (at least
'typeUsageWithUnresolvedReference' and 'kt57320' are affected)

This commit is mainly a preparation for the next commit.

Review: https://jetbrains.team/p/kt/reviews/12750/timeline
2023-11-06 14:41:23 +00:00
..