Files
kotlin-fork/analysis
Nikita Bobko e44e84d1b0 [FIR] Reuse expect/actual matching data of outer declarations during matching of inner declarations
Review: https://jetbrains.team/p/kt/reviews/13244

Motivation:
    ```
    // Module :lib
    class Foo {
        val member: Int = 2
    }

    // Module :app
    // dependencies { implementation(project(":lib")) }
    class Foo {
        val member: Int = 2
    }
    ```

    Before the commit:
        app_Foo.expectForActual is `null`
        app_Foo.member.expectForActual = lib_foo.member
    After the commit:
        app_Foo.expectForActual is `null`
        app_Foo.member.expectForActual is `null`

    If I don't fix this problem then
    `CommonizerHierarchicalIT.testCommonizeHierarchicallyMultiModule`
    becomes red after I fix KT-59887 in the following commits

    `app_Foo.member.expectForActual = lib_foo.member` happens because we
    also need to match fake-overrides (KT-63550)

I didn't measure it, but theoretically, this commit should be a
performance improvement, becuase we reuse `expectForActual` cache

Additionally, The commit breaks some other tests (e.g.
compiler/testData/diagnostics/tests/multiplatform/headerClass/actualMissing.fir.kt).
The tests will become green again, once I fix KT-59887
2023-12-04 13:08:23 +00:00
..
2023-11-21 18:43:06 +00:00
2023-08-25 14:10:37 +00:00