Files
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
454 B
Kotlin
Vendored

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