5e1e8e8f61
The thing is, in a box test there is a proper `UNRESOLVED_REFERENCE` on `M2().a.m2()` in K1 as well, but it's not present in diagnostic tests. And also, there's no error in the Kotlin IntelliJ plugin when viewing such code. It looks dangerous, but since this code is about classes with identical fqNames, and since nothing sus is really compiled, we can probably ignore this problem. It's unlikely that it impacts much.
39 lines
443 B
Kotlin
Vendored
39 lines
443 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
|
// MODULE: m1
|
|
// FILE: a.kt
|
|
|
|
package p
|
|
|
|
public class A {
|
|
public fun m1() {}
|
|
}
|
|
public class M1 {
|
|
public val a: A = A()
|
|
}
|
|
|
|
// MODULE: m2
|
|
// FILE: b.kt
|
|
|
|
package p
|
|
|
|
public class A {
|
|
public fun m2() {}
|
|
}
|
|
|
|
public class M2 {
|
|
public val a: A = A()
|
|
}
|
|
|
|
// MODULE: m3(m1, m2)
|
|
// FILE: b.kt
|
|
|
|
import p.*
|
|
|
|
fun test(a: A) {
|
|
a.m1()
|
|
a.<!UNRESOLVED_REFERENCE!>m2<!>()
|
|
|
|
M1().a.m1()
|
|
|
|
M2().a.m2()
|
|
} |