Files
kotlin-fork/compiler/testData/codegen/boxInline/private/nestedInPrivateClass2.kt
T
Nikolay Lunyak bcfafc601e Add EnumEntries to minimal-stdlib-for-tests
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.

Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-03-02 10:23:38 +00:00

33 lines
661 B
Kotlin
Vendored

// FILE: 1.kt
package test
private class S public constructor() {
class Z {
fun a(): String {
return "K"
}
val empty = ""
}
enum class E(val s: String) {
EMPTY("")
}
}
// This function exposes S.Z and S.E, nested into a private class S (package-private in the byte code)
// They can be accessed outside the `test` package now that S.Z, S.E are public in the byte code, but that may be changed later
internal inline fun call(s: () -> String): String {
return s() + S.Z().empty + S.E.EMPTY.s + S.Z().a()
}
// FILE: 2.kt
import test.*
fun box(): String {
return call {
"O"
}
}