4120d6a8aa
Before this commit, the expect-actual resolver could find expects in
regular dependencies
Note: The appeared `VIRTUAL_MEMBER_HIDDEN` in
compiler/fir/analysis-tests/testData/resolveWithStdlib/multiModule/FakeOverrides.kt
isn't caused by my change. It's caused by fixing the testData dependency
syntax notation.
The testData improperly used regular dependency syntax notation, while
it should have been using dependsOn
Before:
Regular dependency syntax notation
// MODULE: androidMain(commonMain)
After:
dependsOn dependency syntax notation
// MODULE: androidMain()()(commonMain)
36 lines
1003 B
Kotlin
Vendored
36 lines
1003 B
Kotlin
Vendored
// LL_FIR_DIVERGENCE
|
|
// I have no idea why the tests diverge. The test was misconfigured (it used regular dependencies instead of `dependsOn` dependencies).
|
|
// I fixed the misconfiguration, now it turns out that it has been diverged all the time
|
|
// LL_FIR_DIVERGENCE
|
|
// !LANGUAGE: +MultiPlatformProjects
|
|
// MODULE: m1-common
|
|
// FILE: common.kt
|
|
|
|
expect open class A<T>() {
|
|
open fun foo(arg: T)
|
|
}
|
|
open class B : A<String>() {
|
|
// Fake: override fun foo(arg: String) = super.foo(arg)
|
|
// Fake (JVM only): override fun bar(arg: String): String = super.bar(arg)
|
|
}
|
|
open class C : B() {
|
|
open fun bar(arg: String): String = arg
|
|
open fun baz(arg: CharSequence): String = arg.toString()
|
|
}
|
|
|
|
// MODULE: m1-jvm()()(m1-common)
|
|
// FILE: jvm.kt
|
|
|
|
actual open class A<T> {
|
|
actual open fun foo(arg: T) {}
|
|
open fun bar(arg: T): T = arg
|
|
open fun baz(arg: T): T = arg
|
|
}
|
|
class D : C() {
|
|
fun test() {
|
|
foo("")
|
|
bar("") // should be resolved to just C.bar
|
|
baz("")
|
|
}
|
|
}
|