Files
kotlin/compiler/testData/codegen/bytecodeText/mangling/parentheses.kt
Mads Ager 33a24bfd27 JVM_IR: Avoid using parent name in name of captures.
If parent is an anonymous object that could lead to the use
of names such as `$this$no name provided` which is invalid
in dex files.
2020-01-20 10:49:46 +01:00

24 lines
354 B
Kotlin
Vendored

// !SANITIZE_PARENTHESES
class `(X)` {
fun `(Y)`(): String {
fun foo(): String {
return bar { baz() }
}
return foo()
}
fun baz() = "OK"
}
fun bar(p: () -> String) = p()
fun box(): String {
return `(X)`().`(Y)`()
}
// One instance of each is in kotlin.Metadata.d2
// 1 \(X\)
// 1 \(Y\)
// 4 \$this