Files
kotlin-fork/compiler/testData/codegen/box/mangling/parentheses.kt
T
Igor Chevdar 838743bf07 [box-tests] Ignored test for K/N
It will fail in Kotlin 1.7
2022-02-24 15:20:14 +03:00

23 lines
448 B
Kotlin
Vendored

// !SANITIZE_PARENTHESES
// IGNORE_BACKEND: JS, NATIVE
// !LANGUAGE: +JsAllowInvalidCharsIdentifiersEscaping
// Sanitization is needed here because DxChecker reports ParseException on parentheses in names.
class `()` {
fun `()`(): String {
fun foo(): String {
return bar { baz() }
}
return foo()
}
fun baz() = "OK"
}
fun bar(p: () -> String) = p()
fun box(): String {
return `()`().`()`()
}