Files
kotlin-fork/plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/lib/lib.kt
T
Steven Schäfer 3ffe495346 jvm-abi-gen: Mark all anonymous objects in inline function scope as public
Anonymous objects inside of a private inline function nested in a public
inline function can still escape.
2021-08-23 18:25:33 +02:00

20 lines
409 B
Kotlin
Vendored

package lib
var result = "fail"
inline fun foo(crossinline s: () -> String) {
object {
private inline fun test(crossinline z: () -> String) {
object {
fun run() {
result = z()
}
}.run()
}
fun foo() {
test { s() } // regenerated object should be marked as public abi
}
}.foo()
}