3ffe495346
Anonymous objects inside of a private inline function nested in a public inline function can still escape.
20 lines
409 B
Kotlin
Vendored
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()
|
|
}
|