8f0aecce58
NB some cases such as captured extension receiver for an extension lambda are not supported yet; to be discussed, to what extent should we actually follow JVM code shape here.
27 lines
393 B
Kotlin
Vendored
27 lines
393 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)`()
|
|
}
|
|
|
|
// JVM_TEMPLATES
|
|
// One instance of each is in kotlin.Metadata.d2
|
|
// 1 \(X\)
|
|
// 1 \(Y\)
|
|
|
|
// JVM_IR_TEMPLATES
|
|
// 4 this\$0
|