Fir2Ir: provide fake file-level signatures for toplevel privates

We need to supply signatures for private declarations even when their
containing file is not known. In situations where the FirDeclaration in
question is already known (i.e. where we are never going to serach for
the declaation based on that signature), FirDeclaration itself is
sufficient as a key.
This commit is contained in:
Georgy Bronnikov
2022-05-05 09:54:02 +03:00
committed by Alexander Udalov
parent 8fd29a9fec
commit 7605494f2b
8 changed files with 64 additions and 1 deletions
@@ -0,0 +1,19 @@
// MODULE: lib
// FILE: Z.kt
package z
private interface I {
fun k() = "K"
}
interface G<T>
class Z : I, G<I> {
val o = "O"
}
// MODULE: main(lib)
// FILE: box.kt
import z.Z
fun box() = Z().run { o + k() }