Files
kotlin-fork/compiler/testData/diagnostics/tests/multimodule/dependencyModule.fir.kt
T
Brian Norman c1f6fe1e76 [FIR] Do not include transitive friend dependencies in symbol provider
When flattening a dependency FirSymbolProvider, make sure transitive
dependency FirSymbolProviders are not included. This requires checking
that nested symbol provider sessions match the composite symbol provider
session when they are both source sessions.

^KT-60614 Fixed
2023-11-22 19:43:24 +00:00

84 lines
2.1 KiB
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
// MODULE: m1
// FILE: a.kt
package p
public class A {
public val propPublic = A()
internal val propInternal = A()
private val propPrivate = A()
public fun funPublic() = A()
internal fun funInternal() = A()
private fun funPrivate() = A()
public inner class ClassPublic
internal inner class ClassInternal
private inner class ClassPrivate
}
public val propPublic = A()
internal val propInternal = A()
private val propPrivate = A()
public fun funPublic() = A()
internal fun funInternal() = A()
private fun funPrivate() = A()
public class ClassPublic
internal class ClassInternal
private class ClassPrivate
// MODULE: m2(m1)
// FILE: b.kt
import p.*
fun test2() {
propPublic
<!INVISIBLE_REFERENCE!>propInternal<!>
<!INVISIBLE_REFERENCE!>propPrivate<!>
funPublic()
<!INVISIBLE_REFERENCE!>funInternal<!>()
<!INVISIBLE_REFERENCE!>funPrivate<!>()
ClassPublic()
<!INVISIBLE_REFERENCE!>ClassInternal<!>()
<!INVISIBLE_REFERENCE!>ClassPrivate<!>()
val inst = A()
inst.propPublic
inst.<!INVISIBLE_REFERENCE!>propInternal<!>
inst.<!INVISIBLE_REFERENCE!>propPrivate<!>
inst.funPublic()
inst.<!INVISIBLE_REFERENCE!>funInternal<!>()
inst.<!INVISIBLE_REFERENCE!>funPrivate<!>()
inst.ClassPublic()
inst.<!INVISIBLE_REFERENCE!>ClassInternal<!>()
inst.<!INVISIBLE_REFERENCE!>ClassPrivate<!>()
}
// MODULE: m3(m2)
// FILE: c.kt
import <!UNRESOLVED_IMPORT!>p<!>.*
fun test3() {
<!UNRESOLVED_REFERENCE!>propPublic<!>
<!UNRESOLVED_REFERENCE!>propInternal<!>
<!UNRESOLVED_REFERENCE!>propPrivate<!>
<!UNRESOLVED_REFERENCE!>funPublic<!>()
<!UNRESOLVED_REFERENCE!>funInternal<!>()
<!UNRESOLVED_REFERENCE!>funPrivate<!>()
<!UNRESOLVED_REFERENCE!>ClassPublic<!>()
<!UNRESOLVED_REFERENCE!>ClassInternal<!>()
<!UNRESOLVED_REFERENCE!>ClassPrivate<!>()
val inst = <!UNRESOLVED_REFERENCE!>A<!>()
inst.propPublic
inst.propInternal
inst.propPrivate
inst.funPublic()
inst.funInternal()
inst.funPrivate()
inst.ClassPublic()
inst.ClassInternal()
inst.ClassPrivate()
}